更新mnesia模式的最简单方法是什么? [英] What's the simplest way to update mnesia schema?

查看:119
本文介绍了更新mnesia模式的最简单方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,我在记忆中保存了 {id,name} 并想更新为 {id,name,age} ,是否每次更改架构都必须调用 transform_table

For example, I saved {id, name} in mnesia and want to update to {id, name, age}, do I have to call transform_table every time I change schema?

推荐答案

最简单的方法是删除表并重新创建它。如果您需要将数据保留在表格中,请 mnesia:transform_table 是必经之路。

The simplest way is to delete the table and recreate it. If you need to keep the data in the table, mnesia:transform_table is the way to go.

这篇关于更新mnesia模式的最简单方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆