17 lines
495 B
Erlang
17 lines
495 B
Erlang
-module(timestamper).
|
|
-export([start/0, create_tables/1]).
|
|
|
|
start() ->
|
|
ok = application:load(mnesia),
|
|
ok = application:set_env(mnesia, dir, "/usr/lib/yaws/mnesia"),
|
|
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),
|
|
{atomic, ok} = ts_entry:create_table(TableOpts),
|
|
ok.
|