manual-en-US/chapter-03/4.sync.md
2014-10-18 12:30:15 +08:00

280 B

3.4.Synchronize database schema

xorm watches tables and indexes and sync schema:

  1. use table name to create or drop table
  2. use column name to alter column
  3. use the indexes definition in struct field tag to create or drop indexes.
err := engine.Sync(new(User))