Skip to content

Commit

Permalink
fix: compilation errors with TIMESTAMP columns in sqlite3 driver
Browse files Browse the repository at this point in the history
  • Loading branch information
hirasawayuki committed Mar 7, 2024
1 parent 42be9e1 commit 2ce367d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions drivers/sqlboiler-sqlite3/driver/sqlite3.go
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ func (SQLiteDriver) TranslateColumnType(c drivers.Column) drivers.Column {
c.Type = "types.NullDecimal"
case "BOOLEAN":
c.Type = "null.Bool"
case "DATE", "DATETIME":
case "DATE", "DATETIME", "TIMESTAMP":
c.Type = "null.Time"
case "JSON":
c.Type = "null.JSON"
Expand Down Expand Up @@ -558,7 +558,7 @@ func (SQLiteDriver) TranslateColumnType(c drivers.Column) drivers.Column {
c.Type = "types.Decimal"
case "BOOLEAN":
c.Type = "bool"
case "DATE", "DATETIME":
case "DATE", "DATETIME", "TIMESTAMP":
c.Type = "time.Time"
case "JSON":
c.Type = "types.JSON"
Expand Down
16 changes: 8 additions & 8 deletions drivers/sqlboiler-sqlite3/driver/sqlite3.golden.json
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,7 @@
},
{
"name": "time_zero",
"type": "null.String",
"type": "null.Time",
"db_type": "TIMESTAMP",
"default": "NULL",
"comment": "",
Expand Down Expand Up @@ -1335,7 +1335,7 @@
},
{
"name": "time_two",
"type": "null.String",
"type": "null.Time",
"db_type": "TIMESTAMP",
"default": "null",
"comment": "",
Expand All @@ -1350,7 +1350,7 @@
},
{
"name": "time_three",
"type": "null.String",
"type": "null.Time",
"db_type": "TIMESTAMP",
"default": "NULL",
"comment": "",
Expand All @@ -1365,7 +1365,7 @@
},
{
"name": "time_five",
"type": "null.String",
"type": "null.Time",
"db_type": "TIMESTAMP",
"default": "current_timestamp",
"comment": "",
Expand All @@ -1380,7 +1380,7 @@
},
{
"name": "time_nine",
"type": "string",
"type": "time.Time",
"db_type": "TIMESTAMP",
"default": "current_timestamp",
"comment": "",
Expand Down Expand Up @@ -1875,7 +1875,7 @@
},
{
"name": "timestamp_null",
"type": "null.String",
"type": "null.Time",
"db_type": "TIMESTAMP",
"default": "NULL",
"comment": "",
Expand All @@ -1890,7 +1890,7 @@
},
{
"name": "timestamp_nnull",
"type": "string",
"type": "time.Time",
"db_type": "TIMESTAMP",
"default": "current_timestamp",
"comment": "",
Expand Down Expand Up @@ -2508,4 +2508,4 @@
"use_case_when_exists_clause": false,
"use_auto_columns": false
}
}
}

0 comments on commit 2ce367d

Please sign in to comment.