-
-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve issues in UPDATE and DELETE when using schemas
- Loading branch information
Showing
7 changed files
with
68 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,30 @@ | ||
create_table("context_prefix_a_table") { | ||
t.Column("id", "string", { primary: true }) | ||
t.Column("value", "string") | ||
} | ||
|
||
create_table("context_prefix_b_table") { | ||
t.Column("id", "string", { primary: true }) | ||
t.Column("value", "string") | ||
} | ||
{{ if eq .Dialect "sqlite3" }} | ||
create_table("context_prefix_a_table") { | ||
t.Column("id", "string", { primary: true }) | ||
t.Column("value", "string") | ||
} | ||
|
||
create_table("context_prefix_b_table") { | ||
t.Column("id", "string", { primary: true }) | ||
t.Column("value", "string") | ||
} | ||
{{ end }} | ||
|
||
{{ if eq .Dialect "mysql" }} | ||
create_table("context_prefix_a_table") { | ||
t.Column("id", "string", { primary: true }) | ||
t.Column("value", "string") | ||
} | ||
|
||
create_table("context_prefix_b_table") { | ||
t.Column("id", "string", { primary: true }) | ||
t.Column("value", "string") | ||
} | ||
{{ end }} | ||
|
||
{{ if eq .Dialect "postgres" }} | ||
sql("CREATE SCHEMA context_prefix_a") | ||
sql("CREATE SCHEMA context_prefix_b") | ||
sql("CREATE TABLE IF NOT EXISTS \"context_prefix_a\".\"a_table\" (id character varying(255) NOT NULL, value character varying(255) NOT NULL, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL)") | ||
sql("CREATE TABLE IF NOT EXISTS \"context_prefix_b\".\"b_table\" (id character varying(255) NOT NULL, value character varying(255) NOT NULL, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL)") | ||
{{ end }} |