@@ -48,24 +48,23 @@ func Test_UseLongTextInSomeColumnsAndFixBugs(t *testing.T) {
4848
4949	assert .NoError (t , UseLongTextInSomeColumnsAndFixBugs (x ))
5050
51- 	tableInfo , err  :=  x .TableInfo ( & ReviewState {} )
51+ 	tables , err  :=  x .DBMetas ( )
5252	assert .NoError (t , err )
53- 	assert .NotNil (t , tableInfo )
54- 	column  :=  tableInfo .GetColumn ("updated_files" )
55- 	assert .NotNil (t , column )
56- 	assert .Equal (t , "LONGTEXT" , column .SQLType .Name )
5753
58- 	tableInfo , err  =  x .TableInfo (& PackageProperty {})
59- 	assert .NoError (t , err )
60- 	assert .NotNil (t , tableInfo )
61- 	column  =  tableInfo .GetColumn ("value" )
62- 	assert .NotNil (t , column )
63- 	assert .Equal (t , "LONGTEXT" , column .SQLType .Name )
64- 
65- 	tableInfo , err  =  x .TableInfo (& Notice {})
66- 	assert .NoError (t , err )
67- 	assert .NotNil (t , tableInfo )
68- 	column  =  tableInfo .GetColumn ("description" )
69- 	assert .NotNil (t , column )
70- 	assert .Equal (t , "LONGTEXT" , column .SQLType .Name )
54+ 	for  _ , table  :=  range  tables  {
55+ 		switch  table .Name  {
56+ 		case  "review_state" :
57+ 			column  :=  table .GetColumn ("updated_files" )
58+ 			assert .NotNil (t , column )
59+ 			assert .Equal (t , "LONGTEXT" , column .SQLType .Name )
60+ 		case  "package_property" :
61+ 			column  :=  table .GetColumn ("value" )
62+ 			assert .NotNil (t , column )
63+ 			assert .Equal (t , "LONGTEXT" , column .SQLType .Name )
64+ 		case  "notice" :
65+ 			column  :=  table .GetColumn ("description" )
66+ 			assert .NotNil (t , column )
67+ 			assert .Equal (t , "LONGTEXT" , column .SQLType .Name )
68+ 		}
69+ 	}
7170}
0 commit comments