Skip to content

Commit

Permalink
source-mysql: Make date_schema_format the default
Browse files Browse the repository at this point in the history
This commit flips the default behavior for the `date_schema_format`
feature flag. It will be merged immediately after all production
MySQL captures have been modified with the `no_date_schema_format`
setting.
  • Loading branch information
willdonnelly committed Feb 19, 2025
1 parent ac0dd64 commit 68f8c7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions source-mysql/datatype_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ func TestDatatypes(t *testing.T) {
{ColumnType: "set('a', 'b', 'c')", ExpectType: `{"type":["string","null"]}`, InputValue: "b", ExpectValue: `"b"`},
{ColumnType: "set('a', 'b', 'c')", ExpectType: `{"type":["string","null"]}`, InputValue: "a,c", ExpectValue: `"a,c"`},

{ColumnType: "date", ExpectType: `{"type":["string","null"]}`, InputValue: "1991-08-31", ExpectValue: `"1991-08-31"`},
{ColumnType: "date", ExpectType: `{"type":["string","null"]}`, InputValue: "0000-00-00", ExpectValue: `"0001-01-01"`},
{ColumnType: "date", ExpectType: `{"type":["string","null"],"format":"date"}`, InputValue: "1991-08-31", ExpectValue: `"1991-08-31"`},
{ColumnType: "date", ExpectType: `{"type":["string","null"],"format":"date"}`, InputValue: "0000-00-00", ExpectValue: `"0001-01-01"`},
{ColumnType: "time", ExpectType: `{"type":["string","null"]}`, InputValue: "765:43:21", ExpectValue: `"765:43:21"`},
{ColumnType: "time", ExpectType: `{"type":["string","null"]}`, InputValue: "00:00:00", ExpectValue: `"00:00:00"`},
{ColumnType: "year", ExpectType: `{"type":["integer","null"]}`, InputValue: "2003", ExpectValue: `2003`},
Expand Down
2 changes: 1 addition & 1 deletion source-mysql/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
var featureFlagDefaults = map[string]bool{
// When true, date columns will be discovered as `type: string, format: date`
// instead of simply `type: string`
"date_schema_format": false,
"date_schema_format": true,
}

type sshForwarding struct {
Expand Down

0 comments on commit 68f8c7b

Please sign in to comment.