Table with Filestream column recreated in migration script

scratchybackscratchyback Posts: 5
We are using Source Control 3 so perhaps this issue has been resolved with 4 (or we are just doing something wrong). We have a table in our database with a filestream column. Whenever we make a change to the database and create a migration script, this table gets completely recreated again (which takes quite some time considering the amount of data involved). Even with the smallest stored procedure changes, we get a drop and recreate of this huge table as a bonus.

Is there a way to stop Source control from doing this (this is not a workable solution on our production database) or do we need to upgrade? We now manually delete this part form the migration script, but the chance of error is just too big.

Thanks!

Comments

  • Hi scratchyback,

    In the 4.1.8 release notes it shows:
    SC-8094: FILESTREAM columns are no longer dropped before table rebuilds. This means Get Latest no longer throws an error when transferring data to the temporary table during the table rebuild.

    So I believe that should fix your problem!

    Kind regards,
    Alex
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
  • We by now have upgraded to version 5 (which cost us a bunch, we only upgraded to get rid of this problem).... however this problem seems to still exist. At the strangest changes (for example simply changing a function that queries a table that has a relation to another table with a filestream column) a migrationscript will be created that drops the WHOLE related filestream table and recreates it. I don't care if migrationscripts do this even if it isn't really needed for other tables, just to make sure all possible changes are accounted for but for a filestream table really NOT. Especially when a release contains multiple changes (and migration scripts) to the database and each change results in a drop and recreate of this table, then we'd need ages to run the migration script.

    Can anyone confirm that indeed this issue reappeared in 5 even though the release notes of 4 say it was resolved?
  • Hi,

    We have opened a support ticket to deal with your issue and will contact you shortly.

    Thank you,
    Sergio
    Product Support Engineer
    Redgate Software Ltd
    Please see our Help Center for detailed guides on how to use our tools
Sign In or Register to comment.