Documentation ¶
Index ¶
- Constants
- func ParseMySQLQuery(content string) (queries []*entry.Query, err error)
- func ParseMySQLSchema(content string) (schema *entry.Schema, err error)
- type ChangDropColumn
- type ChangDropTable
- type Change
- type ChangeAddColumn
- type ChangeChangeColumn
- type ChangeKind
- type ChangeModifyColumn
- type ChangeRenameTable
Constants ¶
View Source
const ( TableDropChangeKind = "DROP TABLE" TableRenameChangeKind = "RENAME TABLE" ColumnAddChangeKind = "ADD COLUMN" ColumnModifyChangeKind = "MODIFY COLUMN" ColumnChangeChangeKind = "CHANGE COLUMN" ColumnDropChangeKind = "DROP COLUMN" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChangDropColumn ¶
type ChangDropColumn struct {
Name string
}
type ChangDropTable ¶
type ChangDropTable struct{}
type Change ¶
type Change struct { Kind ChangeKind Schema string Table string Target interface{} Content string }
DROP TABLE source="" RENAME TABLE source="" target=new_table_name ADD COLUMN source="" target=new_column_name type MODIFY COLUMN source="old_col" target=type CHANGE COLUMN source="old_col" target=new_col type DROP COLUMN source="old_col"
type ChangeAddColumn ¶
type ChangeChangeColumn ¶
type ChangeChangeColumn struct { Source string Name string Type entry.ColumnType DefaultValue string }
type ChangeKind ¶
type ChangeKind string
type ChangeModifyColumn ¶
type ChangeModifyColumn struct { Source string Type entry.ColumnType DefaultValue string }
type ChangeRenameTable ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.