mirror of
https://github.com/ent/ent.git
synced 2026-05-22 09:31:45 +03:00
imporve sql migration (#3)
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/3 add an append-only mode to the migration Reviewed By: alexsn Differential Revision: D15845370 fbshipit-source-id: f22ae1866d4bb9250bf2d1c6cba476d574a3f45d
This commit is contained in:
committed by
Facebook Github Bot
parent
267e3c15bd
commit
4f31aa6cfe
@@ -274,7 +274,7 @@ func AlterTable(name string) *TableAlter { return &TableAlter{b: Builder{}, name
|
||||
|
||||
// AddColumn appends the `ADD COLUMN` clause to the given `ALTER TABLE` statement.
|
||||
func (t *TableAlter) AddColumn(c *ColumnBuilder) *TableAlter {
|
||||
t.nodes = append(t.nodes, &Wrapper{"ADD %s", c})
|
||||
t.nodes = append(t.nodes, &Wrapper{"ADD COLUMN %s", c})
|
||||
return t
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user