mirror of
https://github.com/ent/ent.git
synced 2026-05-01 23:20:53 +03:00
dialect/entsql: add support for table checks in schema/migration
This commit is contained in:
committed by
Ariel Mashraki
parent
b8f4614bfd
commit
42a2c67cc4
@@ -72,6 +72,9 @@ func (d *SQLite) tBuilder(t *Table) *sql.TableBuilder {
|
||||
for _, c := range t.Columns {
|
||||
b.Column(d.addColumn(c))
|
||||
}
|
||||
if t.Annotation != nil {
|
||||
addChecks(b, t.Annotation)
|
||||
}
|
||||
// Unlike in MySQL, we're not able to add foreign-key constraints to table
|
||||
// after it was created, and adding them to the `CREATE TABLE` statement is
|
||||
// not always valid (because circular foreign-keys situation is possible).
|
||||
|
||||
Reference in New Issue
Block a user