@@ -219,6 +219,14 @@ func (s *SchemaSuite) TestColumnTypes_Postgres() {
219
219
s .Equal ("timestamp(2) without time zone" , column .Type )
220
220
s .Equal ("timestamp" , column .TypeName )
221
221
}
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
+ }
222
230
if column .Name == "date" {
223
231
s .False (column .Autoincrement )
224
232
s .Empty (column .Collation )
@@ -547,6 +555,14 @@ func (s *SchemaSuite) TestColumnTypes_Sqlite() {
547
555
s .Equal ("datetime" , column .Type )
548
556
s .Equal ("datetime" , column .TypeName )
549
557
}
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
+ }
550
566
if column .Name == "date" {
551
567
s .False (column .Autoincrement )
552
568
s .Empty (column .Comment )
@@ -841,6 +857,14 @@ func (s *SchemaSuite) TestColumnTypes_Mysql() {
841
857
s .Equal ("timestamp(2)" , column .Type )
842
858
s .Equal ("timestamp" , column .TypeName )
843
859
}
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
+ }
844
868
if column .Name == "date" {
845
869
s .False (column .Autoincrement )
846
870
s .Empty (column .Collation )
@@ -1164,6 +1188,14 @@ func (s *SchemaSuite) TestColumnTypes_Sqlserver() {
1164
1188
s .Equal ("datetime2(22)" , column .Type )
1165
1189
s .Equal ("datetime2" , column .TypeName )
1166
1190
}
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
+ }
1167
1199
if column .Name == "date" {
1168
1200
s .False (column .Autoincrement )
1169
1201
s .Empty (column .Collation )
@@ -2362,6 +2394,11 @@ func (s *SchemaSuite) createTableAndAssertColumnsForColumnMethods(schema contrac
2362
2394
table .BigInteger ("big_integer" ).Comment ("This is a big_integer column" )
2363
2395
table .Boolean ("boolean_default" ).Default (true ).Comment ("This is a boolean column with default value" )
2364
2396
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
+ }
2365
2402
table .Date ("date" ).Comment ("This is a date column" )
2366
2403
table .DateTime ("date_time" , 3 ).Comment ("This is a date time column" )
2367
2404
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
2401
2438
2402
2439
columnListing := schema .GetColumnListing (table )
2403
2440
2404
- s .Equal (34 , len (columnListing ))
2441
+ s .Equal (35 , len (columnListing ))
2405
2442
s .Contains (columnListing , "another_deleted_at" )
2406
2443
s .Contains (columnListing , "big_integer" )
2444
+ s .Contains (columnListing , "boolean_default" )
2407
2445
s .Contains (columnListing , "char" )
2408
2446
s .Contains (columnListing , "created_at" )
2447
+ s .Contains (columnListing , "custom_type" )
2409
2448
s .Contains (columnListing , "date" )
2410
2449
s .Contains (columnListing , "date_time" )
2411
2450
s .Contains (columnListing , "date_time_tz" )
0 commit comments