mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
dialect/sql/schema: add option to control symbol hashing logic for schema dump (#4411)
This commit is contained in:
@@ -38,6 +38,7 @@ type Atlas struct {
|
||||
dropColumns bool // drop deleted columns
|
||||
dropIndexes bool // drop deleted indexes
|
||||
withForeignKeys bool // with foreign keys
|
||||
hashSymbols bool // whether to use a hash for too long symbols, only for StateReader
|
||||
mode Mode
|
||||
hooks []Hook // hooks to apply before creation
|
||||
diffHooks []DiffHook // diff hooks to run when diffing current and desired
|
||||
@@ -528,6 +529,9 @@ func (a *Atlas) StateReader(tables ...*Table) migrate.StateReaderFunc {
|
||||
}
|
||||
a.sqlDialect = drv
|
||||
}
|
||||
if a.hashSymbols {
|
||||
a.setupTables(tables)
|
||||
}
|
||||
return a.realm(tables)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user