I am attempting to provide a general solution for the migration of data from one schema version to another. A problem arises when the column data type from the source schema does not match that of the destination. I would like to create a query that will perform a preliminary compare on the columns data types to return which columns need to be fixed before migration is possible.
My current approach is to return the table and column names from information_schema.columns
where DATA_TYPE
's between catalogs do not match. However, querying information_schema
directly will only return results from the catalog of the connection.
Has anyone written a query like this?