jspraul / sql-dbdiff

Automatically exported from code.google.com/p/sql-dbdiff
0 stars 0 forks source link

Incorrect Old object script being generated for Tables #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Add a column in a table having Primary Key Constraint in the Source DB.
2.
3.

What is the expected output? What do you see instead?
Expected output:
1.The old object script should not show the Newly added column
2.The new object script should show the newly added column

Actual output:
1.The old object script did not show the Newly added column
2.The new object script did show the newly added column
3.The new object script also showed the following
CONSTRAINT [PK_ConstraintName] PRIMARY KEY CLUSTERED
    (
      [PrimaryKeyColumnName] ASC
    ) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, 
IGNORE_DUP_KEY  = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)

What version of the product are you using? On what operating system?
I am using v3.0 in XP SP3

Please provide any additional information below.

Original issue reported on code.google.com by vinaypug...@gmail.com on 25 Mar 2010 at 5:30

GoogleCodeExporter commented 9 years ago
Vijay,

Would it be possible for you to attach an example SQL Script to show me this
behaviour please, i'm pretty busy fixing all sorts of stuff at the moment. If i 
have
a clear example then i can fix it much faster.

Great error description though, almost perfect!

Original comment by dean.tho...@gmail.com on 8 Apr 2010 at 5:01

GoogleCodeExporter commented 9 years ago
Dean,
Actually there isn't any script for it. I added the New column from SSMS to a 
table 
having Primary key constraint (Note the newly added column isn't the member of 
the 
primary key).

And in the new object script, the following code was present which was absent 
from 
the old object script - 

CONSTRAINT [PK_ConstraintName] PRIMARY KEY CLUSTERED
    (
      [PrimaryKeyColumnName] ASC
    ) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, 
IGNORE_DUP_KEY  = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)

even though the primary isn't affected from adding the new column.

Hope, I have added some clarity to the problem statement.

Please feel free to get back to me in-case of any queries.

Original comment by vinaypug...@gmail.com on 9 Apr 2010 at 4:25

GoogleCodeExporter commented 9 years ago
Hi there,

Yes, i can see the problem now. Very strange, it's like the old script doesn't 
think
the actual PK Field(s) is a primary key and therefore doesn't include the 
script.

Thanks for that!

Original comment by dean.tho...@gmail.com on 9 Apr 2010 at 11:25

GoogleCodeExporter commented 9 years ago
And problem found, line 128 of Database.cs. It's not cloning everything, only
Assemblies, Tables, Proc's, Functions, Views. Not Constraints.

Original comment by dean.tho...@gmail.com on 9 Apr 2010 at 11:46

GoogleCodeExporter commented 9 years ago
Fixed in revision 32, are you able to check-out the latest version and try 
yourself,
or do you need the binaries?

Original comment by dean.tho...@gmail.com on 9 Apr 2010 at 1:51

GoogleCodeExporter commented 9 years ago
I would need the binaries.

Original comment by vinaypug...@gmail.com on 10 Apr 2010 at 4:59

GoogleCodeExporter commented 9 years ago
Please see release 0.4 :)

Original comment by dean.tho...@gmail.com on 16 Apr 2010 at 10:41