feat: add SyncSchema

This commit is contained in:
ei-sugimoto 2024-06-17 15:55:54 +09:00
parent 109f239fae
commit 5affe27f07

View File

@ -24,6 +24,11 @@ func (db *DB) AutoMigrate(dst ...interface{}) error {
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
type ViewOption struct {
Replace bool // If true, exec `CREATE`. If false, exec `CREATE OR REPLACE`