<div dir="ltr"><div><div><div>Thank you, Dmitry,<br><br></div><div>The disadvantage of user_properties in my case is it is not auto-incremented by Mnesia upon table definition change (this feature would be useful for me). <br></div><br></div>Best regards,<br><br></div>Taras<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 14, 2014 at 11:10 AM, Dmitry Kolesnikov <span dir="ltr"><<a href="mailto:dmkolesnikov@gmail.com" target="_blank">dmkolesnikov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
You can use user_properties features of amnesia tables if you need some version for accounting.<br>
<br>
mnesia:create_table(myt, [{user_properties, [{vsn, 1}]}]).<br>
amnesia:table_info(myt, user_properties).<br>
[{vsn,1}]<br>
<br>
<br>
- Dmitry<br>
<div><div class="h5"><br>
On 14 Oct 2014, at 09:33, Shapovalov Taras <<a href="mailto:shapovalovts@gmail.com">shapovalovts@gmail.com</a>> wrote:<br>
<br>
> Hi guys,<br>
><br>
> Do you know if there is a safe way to increment a table version (in Mnesia schema) with some value (>1) or just set its value into a particular version? In my case Mnesia runs only in a local mode (and will never be distributed) and as far as I understand the version is not really used in the local mode, so I would like to utilize it for my purposes.<br>
><br>
> By some reason mnesia_lib:set() does not really work for me. In fact after I call that function and then request the table version, it seems it is changed, but ets:tab2list(schema) shows that it did not (and after I restart Mnesia, the requested version returns to the old value).<br>
><br>
> Best regards,<br>
><br>
> Taras<br>
</div></div>> _______________________________________________<br>
> erlang-questions mailing list<br>
> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
> <a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">/T<br></div>
</div>