This repository has been archived on 2022-04-14. You can view files and clone it, but cannot push or open issues or pull requests.
manual-en-US/chapter-03/4.sync.md
2020-03-27 14:29:41 +08:00

282 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.Sync2(new(User))