Skip to content

Commit

Permalink
Merge pull request #137 from nktks/feature/skip-create-change-stream
Browse files Browse the repository at this point in the history
[v2]change unsupported DDL behavior
  • Loading branch information
kazegusuri authored Feb 13, 2024
2 parents 675211a + d9bf80b commit 783883b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 1 addition & 3 deletions v2/loader/schema_parser_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ func NewSchemaParserSource(fpath string) (SchemaSource, error) {
if isAlterTableAddFK(val) {
continue
}
return nil, fmt.Errorf("stmt should be CreateTable, CreateIndex or AlterTableAddForeignKey, but got '%s'", ddlstmt.SQL())
default:
return nil, fmt.Errorf("stmt should be CreateTable, CreateIndex or AlterTableAddForeignKey, but got '%s'", ddlstmt.SQL())
return nil, fmt.Errorf("unknown statement is specified: %s", ddlstmt.SQL())
}
}

Expand Down
2 changes: 2 additions & 0 deletions v2/loader/source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ CREATE TABLE Simple (
) PRIMARY KEY(Id);
CREATE INDEX SimpleIndex ON Simple(Value);
CREATE UNIQUE INDEX SimpleIndex2 ON Simple(Id, Value);
CREATE CHANGE STREAM EverythingStream
FOR ALL;
`
testSchema2 = `
CREATE TABLE MaxLengths (
Expand Down

0 comments on commit 783883b

Please sign in to comment.