From 63d466ce0b9e2f754d85c0592811a4918b38a35b Mon Sep 17 00:00:00 2001 From: Tim Gallant Date: Sat, 18 Sep 2021 17:43:26 -0700 Subject: [PATCH] add bool type to test schema --- database/mysql/mysql.go | 1 + database/sqlite3/sqlite3.go | 1 + test/setup.go | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/database/mysql/mysql.go b/database/mysql/mysql.go index 5ae0f9d..6b377a1 100644 --- a/database/mysql/mysql.go +++ b/database/mysql/mysql.go @@ -17,6 +17,7 @@ var ( "bigint unsigned": {Name: "number", Format: ""}, "longtext": {Name: "string", Format: ""}, "datetime(3)": {Name: "string", Format: "date-time"}, + "tinyint(1)": {Name: "boolean", Format: ""}, } ) diff --git a/database/sqlite3/sqlite3.go b/database/sqlite3/sqlite3.go index 0c98b60..0b8b101 100644 --- a/database/sqlite3/sqlite3.go +++ b/database/sqlite3/sqlite3.go @@ -66,6 +66,7 @@ var ( "text": {Name: "string", Format: ""}, "boolean": {Name: "boolean", Format: ""}, "BOOLEAN": {Name: "boolean", Format: ""}, + "numeric": {Name: "boolean", Format: ""}, "datetime": {Name: "string", Format: "date-time"}, "DATETIME": {Name: "string", Format: "date-time"}, } diff --git a/test/setup.go b/test/setup.go index e37d8b1..b203bb5 100644 --- a/test/setup.go +++ b/test/setup.go @@ -23,7 +23,8 @@ type Artist struct { type Album struct { gorm.Model - Title string + Title string + Released bool } type Track struct {