Hi mark,
I have test SQL compare with option you specified however; it still did not work.
These are the steps I did.
1. CREATE TABLE [dbo].[Test](
[Id] [UNIQUEIDENTIFIER] NOT NULL,
[Name] [NVARCHAR](255) NOT NULL,
CONSTRAINT [PK_Test-Id] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Test] ADD CONSTRAINT [DF_Test-Id] DEFAULT (NEWSEQUENTIALID()) FOR [Id]
GO
2. CREATE TABLE [dbo].[MigrationHistory](
[Id] [UNIQUEIDENTIFIER] NOT NULL,
[DatabaseName] [NVARCHAR](50) NOT NULL,
[DACPACVersion] [NVARCHAR](50) NOT NULL,
[MigrationScriptFileName] [NVARCHAR](100) NOT NULL,
[Description] [NVARCHAR](1000) NOT NULL,
[RequestedBy] [NVARCHAR](50) NOT NULL,
[RequestedOn] [DATETIME] NOT NULL,
[DatabaseCreatedOn] [DATETIME] NULL,
[RedundantColumn] [NVARCHAR](50) NULL,
CONSTRAINT [PKC__DatabaseMigrationHistory-DACPACVersion-Id-MigrationScriptFileName] PRIMARY KEY CLUSTERED
(
[Id] ASC,
[DACPACVersion] ASC,
[MigrationScriptFileName] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MigrationHistory] ADD CONSTRAINT [DF__DatabaseMigrationHistory-Id] DEFAULT (NEWSEQUENTIALID()) FOR [Id]
GO
ALTER TABLE [dbo].[MigrationHistory] ADD CONSTRAINT [DF__DatabaseMigrationHistory-MigrationScriptFileName] DEFAULT ('NO MIGRATION SCRIPT EXECUTED') FOR [MigrationScriptFileName]
GO
3. Added NULLABLE UNIQUEIDENTIFIER column ([TestId] [UNIQUEIDENTIFIER] NULL) to [MigrationHistory] table
4. Commit the changes to Development and Staging databases (Repeat Step 1 to 4 for Staging database)
5. On Development DB; Update TestId column to NOT NULL in MigrationHistory table and update values from Test table (Create the migration script for these changes and commit)
6. Open SQL Compare and compare Development and Staging database with Use Migration scripts (V2) option and try to deploy the changes. Note that even after mapping No migration scripts identified. / comments
- Community
- SQL Compare 11
- Migration script for Renamed table is not found
Hi mark,
I have test SQL compare with option you specified however; it still did not work.
These are the steps I did.
1. CREATE TABLE [dbo].[Test](
[Id] [UNIQUEIDENTIFIER] NOT NULL,
[Name] [NVARCHA...
0 votes