ent/sql/migrate: support indexes

Reviewed By: alexsn

Differential Revision: D16711184

fbshipit-source-id: 632b02c5c77c6289b242263647d45d9f28752e3f
This commit is contained in:
Ariel Mashraki
2019-08-11 05:43:27 -07:00
committed by Facebook Github Bot
parent 933fe91741
commit 329b5ddf77
13 changed files with 502 additions and 43 deletions

View File

@@ -57,9 +57,9 @@ func (d *SQLite) setRange(ctx context.Context, tx dialect.Tx, name string, value
return tx.Exec(ctx, query, args, new(sql.Result))
}
func (d *SQLite) cType(c *Column) string { return c.SQLiteType() }
func (d *SQLite) tBuilder(t *Table) *sql.TableBuilder { return t.SQLite() }
func (d *SQLite) cBuilder(c *Column) *sql.ColumnBuilder { return c.SQLite() }
func (*SQLite) cType(c *Column) string { return c.SQLiteType() }
func (*SQLite) tBuilder(t *Table) *sql.TableBuilder { return t.SQLite() }
func (*SQLite) cBuilder(c *Column) *sql.ColumnBuilder { return c.SQLite() }
// fkExist returns always tru to disable foreign-keys creation after the table was created.
func (d *SQLite) fkExist(context.Context, dialect.Tx, string) (bool, error) { return true, nil }