17 lines
527 B
Erlang
17 lines
527 B
Erlang
|
-module(timestamper).
|
||
|
-export([start/0, create_tables/1]).
|
||
|
|
||
|
start() ->
|
||
|
ok = application:load(mnesia),
|
||
|
ok = application:set_env(mnesia, dir, "/home/jdbernard/projects/timestamper/web-app/db/test"),
|
||
|
ok = mnesia:start(),
|
||
|
ok.
|
||
|
|
||
|
create_tables(Nodes) ->
|
||
|
TableOpts = [{disc_copies, Nodes}],
|
||
|
{atomic, ok} = id_counter:create_table(TableOpts),
|
||
|
{atomic, ok} = ts_user:create_table(TableOpts),
|
||
|
{atomic, ok} = ts_timeline:create_table(TableOpts),
|
||
|
{atmoic, ok} = ts_entry:create_table(TableOpts),
|
||
|
ok.
|