-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql/sqlite: allow setting user-defined types (#3164)
- Loading branch information
Showing
5 changed files
with
68 additions
and
2 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
internal/integration/testdata/sqlite/column-user-defined.txt
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Initial changes. | ||
atlas schema apply --url URL --dev-url DEV_URL --to file://schema.v1.hcl --auto-approve | ||
atlas schema apply --url URL --dev-url DEV_URL --to file://schema.v1.hcl --auto-approve | ||
stdout 'Schema is synced, no changes to be made' | ||
atlas schema inspect --url URL > got | ||
cmp schema.v1.hcl.inspected got | ||
|
||
# Changing user defined type. | ||
atlas schema apply --url URL --dev-url DEV_URL --to file://schema.v2.hcl --auto-approve | ||
atlas schema apply --url URL --dev-url DEV_URL --to file://schema.v2.hcl --auto-approve | ||
stdout 'Schema is synced, no changes to be made' | ||
atlas schema inspect --url URL > got | ||
cmp schema.v2.hcl.inspected got | ||
|
||
-- schema.v1.hcl -- | ||
table "t" { | ||
schema = schema.main | ||
column "c" { | ||
null = true | ||
type = sql("USER_DEFINED") | ||
} | ||
} | ||
schema "main" { | ||
} | ||
-- schema.v1.hcl.inspected -- | ||
table "t" { | ||
schema = schema.main | ||
column "c" { | ||
null = true | ||
type = sql("USER_DEFINED") | ||
} | ||
} | ||
schema "main" { | ||
} | ||
-- schema.v2.hcl -- | ||
table "t" { | ||
schema = schema.main | ||
column "c" { | ||
null = true | ||
type = sql("USER_TYPE") | ||
} | ||
} | ||
schema "main" { | ||
} | ||
-- schema.v2.hcl.inspected -- | ||
table "t" { | ||
schema = schema.main | ||
column "c" { | ||
null = true | ||
type = sql("USER_TYPE") | ||
} | ||
} | ||
schema "main" { | ||
} |
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