Option to create or alter table

Hello,
I have the trial version and I have a question.
I currently have an empty database which is the first version of the database and I make every change in a copy of this database lets name it Test Database.
When I compare those two it creates or alter a table . My problem is that if I already update the database on my clients with a previous script it doesnt alter a table it just ignore it.
Because it is complicated and I don't know if I explain it well I will give you an example.
In empty database I dont have Login Table so when I create the script it has the Create Table[dbo].[Login] etc..
In my Test Database I alter the password field from int to nvarchar .
My script now has again the Create Table but with field password [nvarchar] instead of [int]
In my client now if I run the script it will see that the table exists and will not make any change to it.
I want to check if the table exists and if all the fields are the same and then alter if anything has changed.

Tagged:

Answers

  • Why not create the deployment script based on comparing your development database against your client's database?
    David Atkinson
    Product Manager
    Redgate Software
  • comworldcomworld Posts: 2 New member
    Why not create the deployment script based on comparing your development database against your client's database?
     Because the client is not just one. I have many clients that have diferent versions of the SQL database (some of them didn't update for two or three versions and some have over a year to get updates)
  • Redgate's deployment script isn't idempotent so can't be used in that way. And in fact this isn't a good practice as it means you aren't in a position to test the deployment script on a true representation of your client target prior to the actual deployment. Why not get your clients to send you a SQL Compare schema snapshot file, and then create custom deployment scripts for each customer? You can use the SQL Snapper tool to do this, which is freely distributable.
    David Atkinson
    Product Manager
    Redgate Software
Sign In or Register to comment.