dialect/sql/schema: better error message for sqlite limitation (#401)

This commit is contained in:
Ariel Mashraki
2020-03-22 22:04:00 +02:00
committed by GitHub
parent 4d29191005
commit a6e5124d13

View File

@@ -149,4 +149,8 @@ func (d *SQLite) dropIndex(ctx context.Context, tx dialect.Tx, idx *Index, table
// fkExist returns always true to disable foreign-keys creation after the table was created.
func (d *SQLite) fkExist(context.Context, dialect.Tx, string) (bool, error) { return true, nil }
func (d *SQLite) table(context.Context, dialect.Tx, string) (*Table, error) { return nil, nil }
// table returns always error to indicate that SQLite dialect doesn't support incremental migration.
func (d *SQLite) table(context.Context, dialect.Tx, string) (*Table, error) {
return nil, fmt.Errorf("sqlite dialect does not support incremental migration")
}