Migration script to handle non static table

firasrfirasr Posts: 4
edited December 29, 2016 8:57AM in SQL Source Control
Hi,

I have the following scenario:
1. Currency is a static/lookup table controlled by SQL Source Control.
2. Product is a non static table with a foreign relationship to Currency table. It's already filled with records in production environment.

What I want to do is to delete some records from Currency table which already referenced by Product table.

How can I do that, do I need to write a migration script that handle Product table first (change currency for example), commit the task, then commit another task which updates Currency table?

Is it an acceptable solution to use the migration script in this way?

Thanks

Comments

  • Hi,

    Yes, the procedure you describe on your post should work.

    As a side note we recommend deploying from Source Control to production using SQL Compare, rather than using SQL Source Control directly.

    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.