IgnoreColumns only for existing rows?

LittleColinLittleColin Posts: 16
edited August 14, 2009 12:14PM in SQL Data Compare Previous Versions
Is it possible to ignore a certain column but only where a data row already exists?

For example, we create scripts during development with some basic data that can be customised in production. We don't want to overwrite the production data changes with our development values but if the row doesn't exist then we want to populate it with an initial value.

Comments

  • Forgot to mention, we are using the command line to achieve this at the moment.

    I think I've solved this by doing a two step script generation.
    1. Use /include:Missing to add any additional rows introduced in Dev and carry across all columns.
    2. Use /include:Differences /ignoreColumns:MyProductionMasterColumn to carry across updates without affecting columns that are edited in production.
  • Splitting the steps does introduce issues because the dependencies are not managed for me. Our current full process is:

    1. Synchronise basic static data (only managed in development)
    2. Add any missing row data (/include:Missing)
    3. Add any column updates where the columns are not managed in production (using /ignoreColumns)

    However if data is added in step 1 that is dependent on the missing rows added in step 2 then it fails. If I move step 1 to after step 2 then I have the same dependency issue but the other way around. Ideally I need to be able to run all of the above in a single go and let RedGate figure out the dependencies.

    Is it likely that this can be done via the API?
  • I'm not the expert here but I have an idea of the situation and I think I can help. Firstly, in your second post you've got exactly the right idea.
    However, the problems you raise in your third post are not to do with dependencies - as Data Compare ignores them (FK, constraints, ref. integrity are disabled before and then re-enabled after the script is run)- but I think the failures are simply that the database is being updated at the same time. In which case the only recommendation is to run the script at a quieter time. Data Compare is good but not quite that good, yet :)
Sign In or Register to comment.