Base solution for your next web application
Open Closed

Issue when running Migrator a second time #6305


User avatar
0
gep13 created

We have an odd situation, and I am not sure where to start with debugging this, so I am hoping that someone can shed some light on the problem.

We have released a version of the website, and installed it on a test machine, and everything is working as expected.

Since then, we have made some changes to the website, including adding some database tables, and changing schema etc.

If we run Migrator on the already installed instance, all the database changes are applied correctly.

However, if I run the same Migrator on a new instance of the website, not all migrations are applied. It seems to miss deploying the last 5 migrations.

Has anyone seen anything like this? There are no errors reported during the process of deploying the new database.

Thanks Gary


2 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @gep13

    We haven't faced suc a problem before. Is the Migrator you are running on the already installed instance same with the one you are running on the new one ?

    It seems like the Migrator for the second (new instance) is using older DLLs. You can re-publish Migrator app and try to run it again.

  • User Avatar
    0
    gep13 created

    Thanks for getting back to me. I have found the issue.

    There was actually an error being thrown in Migrator, which wasn't being caught due to how Migrator was being executed. Migrator always returned with a zero exit code, even when there was an error. I have changed the code of Migrator to now return a non-zero exit code when there is a problem, and this is now surfacing as part of the installation process that we are using.

    Thanks