[erlang-questions] How to control a table version in Mnesia?

Dmitry Kolesnikov dmkolesnikov@REDACTED
Tue Oct 14 09:10:40 CEST 2014


You can use user_properties features of amnesia tables if you need some version for accounting.

mnesia:create_table(myt, [{user_properties, [{vsn, 1}]}]).
amnesia:table_info(myt, user_properties).

- Dmitry

On 14 Oct 2014, at 09:33, Shapovalov Taras <shapovalovts@REDACTED> wrote:

> Hi guys,
> 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.
> 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).
> Best regards,
> Taras
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

More information about the erlang-questions mailing list