Comet Liao
Comet Liao

Reputation: 305

What's the simplest way to update mnesia schema?

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?

Upvotes: 7

Views: 1966

Answers (1)

legoscia
legoscia

Reputation: 41568

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.

Upvotes: 3

Related Questions