feat: add SyncSchema
This commit is contained in:
parent
109f239fae
commit
5affe27f07
@ -24,6 +24,11 @@ func (db *DB) AutoMigrate(dst ...interface{}) error {
|
|||||||
return db.Migrator().AutoMigrate(dst...)
|
return db.Migrator().AutoMigrate(dst...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SyncSchema is an alias for AutoMigrate
|
||||||
|
func (db *DB) SyncSchema(dst ...interface{}) error {
|
||||||
|
return db.AutoMigrate(dst...)
|
||||||
|
}
|
||||||
|
|
||||||
// ViewOption view option
|
// ViewOption view option
|
||||||
type ViewOption struct {
|
type ViewOption struct {
|
||||||
Replace bool // If true, exec `CREATE`. If false, exec `CREATE OR REPLACE`
|
Replace bool // If true, exec `CREATE`. If false, exec `CREATE OR REPLACE`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user