mnesia 动态改变数据库字段

create() ->
 mnesia:create_table(?ID_TABLE, [{disc_copies, [node()]}, {attributes, record_info(fields, unique_id)}]),
 Fun = fun(Old) ->
    #game_server_data{id=Old#game_server_data_0_0_0.id,
          name=Old#game_server_data_0_0_0.name,
          first_time=Old#game_server_data_0_0_0.first_time,
          pid=Old#game_server_data_0_0_0.pid}
    end,
 mnesia:transform_table(?GAME_SERVER_INFO_TABLE, Fun, record_info(fields, game_server_data)).

mnesia 动态改变数据库字段,布布扣,bubuko.com

mnesia 动态改变数据库字段

上一篇:InnoDB Lock


下一篇:java JDBC 数据库链接