Error when running Migratedb.bat

I am trying to migrate the content for our teamcity server (3.1.1 enterprise license) from hsqldb to MySql. I ran into an issue when running migratedb.bat - 'value too large for column', I tracked down the issue to a database column(Requestor) in 'history' table with a max width of 64 and the data file having a 'requestor' value of size>64.

I tried running 'migratedb.bat migrate-preserve' and then modified targetschema.sql to increase the column width for 'requestor' in history table, and then ran 'migratedb import <data-dir>', It seems that import command attempts to recreate the schema file thus overwriting my changes. At the moment, the only way I can get this to work is by modifying the offending data in the data file(history.csv) to a length < 64 and then running the import command. Is there a way I can get the data imported with the modified targetschema.sql and prevent the migration tool from recreating this file everytime I run 'migratedb import'?

Thanks!

3 comments
Comment actions Permalink

No, there's no way you can change embedded schema, and this is done
intentionally.

However, this kind of problems with migration are solved in 4.x branch
of TeamCity. If you upgrade to 4.0 you will be able to migrate without
encountering such errors. Release of TC 4.0 is planned next month, EAPs
are available as usually.

kpmeena wrote:

I am trying to migrate the content for our teamcity server (3.1.1 enterprise license) from hsqldb to MySql. I ran into an issue when running migratedb.bat - 'value too large for column', I tracked down the issue to a database column(Requestor) in 'history' table with a max width of 64 and the data file having a 'requestor' value of size>64.

I tried running 'migratedb.bat migrate-preserve' and then modified targetschema.sql to increase the column width for 'requestor' in history table, and then ran 'migratedb import <data-dir>', It seems that import command attempts to recreate the schema file thus overwriting my changes. At the moment, the only way I can get this to work is by modifying the offending data in the data file(history.csv) to a length < 64 and then running the import command. Is there a way I can get the data imported with the modified targetschema.sql and prevent the migration tool from recreating this file everytime I run 'migratedb import'?

Thanks!

0
Comment actions Permalink

Appreciate your prompt response. I was planning to modify the column width in the database directly after migrating the existing data, so that it doesn't create problems with the subsequent database inserts after we go live, do you think that would create any problems?

0
Comment actions Permalink

kpmeena wrote:

Appreciate your prompt response. I was planning to modify the column width in the database directly after migrating the existing data, so that it doesn't create problems with the subsequent database inserts after we go live, do you think that would create any problems?


Modification of schema is strongly not recommended, since you loose the
ability to upgrade to next TC version.

TC 4.x branch contains changes to handle bigger 'requestor' values (they
will be truncated to 1024 chars). I highly encourage you to either wait
for 4.0 release or use our latest EAP version.

0

Please sign in to leave a comment.