Skip to content

Commit

Permalink
add bool type to test schema
Browse files Browse the repository at this point in the history
  • Loading branch information
tgallant committed Sep 19, 2021
1 parent b440789 commit 63d466c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions database/mysql/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""},
}
)

Expand Down
1 change: 1 addition & 0 deletions database/sqlite3/sqlite3.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
}
Expand Down
3 changes: 2 additions & 1 deletion test/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ type Artist struct {

type Album struct {
gorm.Model
Title string
Title string
Released bool
}

type Track struct {
Expand Down

0 comments on commit 63d466c

Please sign in to comment.