Skip to content

Commit

Permalink
fix sql table column type throws error (#3501)
Browse files Browse the repository at this point in the history
  • Loading branch information
case-k-git authored Jun 4, 2024
1 parent 67ab932 commit f5341c5
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions catalog/resource_sql_table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,33 @@ func TestResourceSqlTableUpdateTable_ColumnsTypeThrowsError(t *testing.T) {
)
}

func TestResourceSqlTableUpdateTable_ColumnsTypeUpperLowerCaseThrowsError(t *testing.T) {
resourceSqlTableUpdateColumnHelper(t,
resourceSqlTableUpdateColumnTestMetaData{
oldColumns: []SqlColumnInfo{
{
Name: "one",
Type: "string", // Lower Case.
Comment: "old comment",
Nullable: false,
},
},
newColumns: []SqlColumnInfo{
{
Name: "one",
Type: "STRING", // Upper Case.
Comment: "old comment",
Nullable: true,
},
},
allowedCommands: []string{
"ALTER TABLE `main`.`foo`.`bar` ALTER COLUMN `one` DROP NOT NULL",
},
expectedErrorMsg: "",
},
)
}

func TestResourceSqlTableUpdateTable_ColumnsAdditionAndUpdateThrowsError(t *testing.T) {
resourceSqlTableUpdateColumnHelper(t,
resourceSqlTableUpdateColumnTestMetaData{
Expand Down

0 comments on commit f5341c5

Please sign in to comment.