@@ -219,6 +219,14 @@ func (s *SchemaSuite) TestColumnTypes_Postgres() {
219219 s .Equal ("timestamp(2) without time zone" , column .Type )
220220 s .Equal ("timestamp" , column .TypeName )
221221 }
222+ if column .Name == "custom_type" {
223+ s .False (column .Autoincrement )
224+ s .Equal ("This is a custom type column" , column .Comment )
225+ s .Empty (column .Default )
226+ s .False (column .Nullable )
227+ s .Equal ("macaddr" , column .Type )
228+ s .Equal ("macaddr" , column .TypeName )
229+ }
222230 if column .Name == "date" {
223231 s .False (column .Autoincrement )
224232 s .Empty (column .Collation )
@@ -547,6 +555,14 @@ func (s *SchemaSuite) TestColumnTypes_Sqlite() {
547555 s .Equal ("datetime" , column .Type )
548556 s .Equal ("datetime" , column .TypeName )
549557 }
558+ if column .Name == "custom_type" {
559+ s .False (column .Autoincrement )
560+ s .Empty (column .Comment )
561+ s .Empty (column .Default )
562+ s .False (column .Nullable )
563+ s .Equal ("geometry" , column .Type )
564+ s .Equal ("geometry" , column .TypeName )
565+ }
550566 if column .Name == "date" {
551567 s .False (column .Autoincrement )
552568 s .Empty (column .Comment )
@@ -841,6 +857,14 @@ func (s *SchemaSuite) TestColumnTypes_Mysql() {
841857 s .Equal ("timestamp(2)" , column .Type )
842858 s .Equal ("timestamp" , column .TypeName )
843859 }
860+ if column .Name == "custom_type" {
861+ s .False (column .Autoincrement )
862+ s .Equal ("This is a custom type column" , column .Comment )
863+ s .Empty (column .Default )
864+ s .False (column .Nullable )
865+ s .Equal ("geometry" , column .Type )
866+ s .Equal ("geometry" , column .TypeName )
867+ }
844868 if column .Name == "date" {
845869 s .False (column .Autoincrement )
846870 s .Empty (column .Collation )
@@ -1164,6 +1188,14 @@ func (s *SchemaSuite) TestColumnTypes_Sqlserver() {
11641188 s .Equal ("datetime2(22)" , column .Type )
11651189 s .Equal ("datetime2" , column .TypeName )
11661190 }
1191+ if column .Name == "custom_type" {
1192+ s .False (column .Autoincrement )
1193+ s .Empty (column .Comment )
1194+ s .Empty (column .Default )
1195+ s .False (column .Nullable )
1196+ s .Equal ("geometry" , column .Type )
1197+ s .Equal ("geometry" , column .TypeName )
1198+ }
11671199 if column .Name == "date" {
11681200 s .False (column .Autoincrement )
11691201 s .Empty (column .Collation )
@@ -2362,6 +2394,11 @@ func (s *SchemaSuite) createTableAndAssertColumnsForColumnMethods(schema contrac
23622394 table .BigInteger ("big_integer" ).Comment ("This is a big_integer column" )
23632395 table .Boolean ("boolean_default" ).Default (true ).Comment ("This is a boolean column with default value" )
23642396 table .Char ("char" ).Comment ("This is a char column" )
2397+ if schema .GetConnection () != database .DriverPostgres .String () {
2398+ table .Column ("custom_type" , "geometry" ).Comment ("This is a custom type column" )
2399+ } else {
2400+ table .Column ("custom_type" , "macaddr" ).Comment ("This is a custom type column" )
2401+ }
23652402 table .Date ("date" ).Comment ("This is a date column" )
23662403 table .DateTime ("date_time" , 3 ).Comment ("This is a date time column" )
23672404 table .DateTimeTz ("date_time_tz" , 3 ).Comment ("This is a date time with time zone column" )
@@ -2401,11 +2438,13 @@ func (s *SchemaSuite) createTableAndAssertColumnsForColumnMethods(schema contrac
24012438
24022439 columnListing := schema .GetColumnListing (table )
24032440
2404- s .Equal (34 , len (columnListing ))
2441+ s .Equal (35 , len (columnListing ))
24052442 s .Contains (columnListing , "another_deleted_at" )
24062443 s .Contains (columnListing , "big_integer" )
2444+ s .Contains (columnListing , "boolean_default" )
24072445 s .Contains (columnListing , "char" )
24082446 s .Contains (columnListing , "created_at" )
2447+ s .Contains (columnListing , "custom_type" )
24092448 s .Contains (columnListing , "date" )
24102449 s .Contains (columnListing , "date_time" )
24112450 s .Contains (columnListing , "date_time_tz" )
0 commit comments