I have been helping migrate a java application originally written in 2001 to a new cloud based environment. The application uses a mysql database and needs to be migrated to SQLServer. A contractor was assigned to this effort, and I was to help her out, because I had written code for it in 2001. The code used Torque as an orm, so the initial conversion of the db schema was done using the torque tools.
Once we had installed everything, we asked for some testing. We got a whole lot of issues reported back. Progress was slow, because everything that the user found incorrect stopped the rest of his testing. We were able to isolate the following differences between SQLServer and mysql.
- LONGVARCHAR. In most cases, we could get away with using a regular VARCHAR(4000). In a single case, we needed to make it a VARCHAR(max)
- TINYINT. this is signed on mysql and unsigned on SQLServer.
We also needed to change some of the sql code that we had written to adapt it to SQLServer.
When reviewing the code, I discovered that we also had junit tests, and these tests are comprehensive. So kudos to younger me (and colleague) for having taken time then to do things correctly. Now, i am running the junit tests to figure out if we have other things to worry about. I already found issues with making two fields nullable and fixed them.. Keeping my fingers crossed.
No comments:
Post a Comment