282 B
282 B
3.4.Synchronize database schema
xorm watches tables and indexes and sync schema:
- use table name to create or drop table
- use column name to alter column
- use the indexes definition in struct field tag to create or drop indexes.
err := engine.Sync2(new(User))