@@ -183,6 +183,12 @@ func ExecuteQuery(ctx context.Context, t *testing.T, streams []string, operation
183183 require .NoError (t , err , fmt .Sprintf ("failed to execute %s operation" , operation ), err )
184184 return
185185
186+ case "evolve-schema" :
187+ query = fmt .Sprintf ("ALTER TABLE %s MODIFY COLUMN id_int BIGINT, MODIFY COLUMN price_float DOUBLE;" , integrationTestTable )
188+
189+ case "devolve-schema" :
190+ query = fmt .Sprintf ("ALTER TABLE %s MODIFY COLUMN id_int INT, MODIFY COLUMN price_float FLOAT" , integrationTestTable )
191+
186192 default :
187193 t .Fatalf ("Unsupported operation: %s" , operation )
188194 }
@@ -256,7 +262,7 @@ var ExpectedMySQLData = map[string]interface{}{
256262
257263var ExpectedIcebergUpdatedData = map [string ]interface {}{
258264 "id_bigint" : int64 (987654321098765 ),
259- "id_int" : int32 (200 ),
265+ "id_int" : int64 (200 ),
260266 "id_int_unsigned" : int32 (201 ),
261267 "id_integer" : int32 (202 ),
262268 "id_integer_unsigned" : int32 (203 ),
@@ -269,7 +275,7 @@ var ExpectedIcebergUpdatedData = map[string]interface{}{
269275 "price_decimal" : float32 (543.21 ),
270276 "price_double" : float64 (654.321 ),
271277 "price_double_precision" : float64 (654.321 ),
272- "price_float" : float32 (543.21 ),
278+ "price_float" : float64 (543.21 ),
273279 "price_numeric" : float32 (543.21 ),
274280 "price_real" : float64 (654.321 ),
275281 "name_char" : "X" ,
@@ -347,3 +353,35 @@ var MySQLToDestinationSchema = map[string]string{
347353 "long_varchar" : "mediumtext" ,
348354 "name_bool" : "tinyint" ,
349355}
356+
357+ var EvolvedMySQLToDestinationSchema = map [string ]string {
358+ "id" : "unsigned int" ,
359+ "id_bigint" : "bigint" ,
360+ "id_int" : "bigint" ,
361+ "id_int_unsigned" : "unsigned int" ,
362+ "id_integer" : "int" ,
363+ "id_integer_unsigned" : "unsigned int" ,
364+ "id_mediumint" : "mediumint" ,
365+ "id_mediumint_unsigned" : "unsigned mediumint" ,
366+ "id_smallint" : "smallint" ,
367+ "id_smallint_unsigned" : "unsigned smallint" ,
368+ "id_tinyint" : "tinyint" ,
369+ "id_tinyint_unsigned" : "unsigned tinyint" ,
370+ "price_decimal" : "decimal" ,
371+ "price_double" : "double" ,
372+ "price_double_precision" : "double" ,
373+ "price_float" : "double" ,
374+ "price_numeric" : "decimal" ,
375+ "price_real" : "double" ,
376+ "name_char" : "char" ,
377+ "name_varchar" : "varchar" ,
378+ "name_text" : "text" ,
379+ "name_tinytext" : "tinytext" ,
380+ "name_mediumtext" : "mediumtext" ,
381+ "name_longtext" : "longtext" ,
382+ "created_date" : "datetime" ,
383+ "created_timestamp" : "timestamp" ,
384+ "is_active" : "tinyint" ,
385+ "long_varchar" : "mediumtext" ,
386+ "name_bool" : "tinyint" ,
387+ }
0 commit comments