Skip to content

Commit

Permalink
feat: add SyncSchema
Browse files Browse the repository at this point in the history
  • Loading branch information
ei-sugimoto committed Jun 17, 2024
1 parent 109f239 commit 5affe27
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit 5affe27

Please sign in to comment.