Bug #96231 | Failed to add Auto Increment in PK column during migration from MS SQL | ||
---|---|---|---|
Submitted: | 17 Jul 2019 11:16 | Modified: | 18 Jul 2019 8:41 |
Reporter: | Juro Team | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Workbench: Migration | Severity: | S3 (Non-critical) |
Version: | 8.0.14 / 8.0.15 / 8.0.16 | OS: | Windows |
Assigned to: | CPU Architecture: | Any | |
Tags: | auto increment, migration, ms sql |
[17 Jul 2019 11:16]
Juro Team
[17 Jul 2019 13:56]
MySQL Verification Team
Thank you for the bug report. Please provide the create table statement for MSSQL server. Thanks.
[17 Jul 2019 23:18]
Juro Team
This is the statement you asked for: /****** Object: Table [dbo].[ENTRY] Script Date: 2019-07-18 01:09:57 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[ENTRY]( [ID] [bigint] IDENTITY(1,1) NOT NULL, [CREATED] [datetime2](7) NULL, [UPDATED] [datetime2](7) NULL, [ALERT_DATE] [datetime2](7) NULL, [CATEGORY] [varchar](255) NULL, [COMPONENT] [varchar](255) NULL, [CONTENT] [varchar](max) NULL, [DATE] [datetime2](7) NULL, [ENDS] [datetime2](7) NULL, [NOTIFICATION_SENT] [bit] NOT NULL, [REGION] [varchar](255) NULL, [SHOW_ENDS] [bit] NULL, [TOPIC] [varchar](500) NULL, 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] TEXTIMAGE_ON [PRIMARY] GO
[18 Jul 2019 8:41]
MySQL Verification Team
Thank you for the feedback.
[5 Dec 2019 12:07]
w lg
This bug still exist in 8.0.18, could someone to fix this bug? that will be great. Thanks.
[20 May 2020 15:11]
Dennis Racine
This bug still exists in 8.0.20, I'm running 8.0.13 to get around the issue, which worked fine on MySQL 5.7 but I'm upgrading to mySQL 8 and now I have another bug that was fixed after 8.0.13, so I really need this fixed! Crazy to think this bug has existed for the last 7 versions? what the heck! Please fix this ASAP.
[2 Dec 2020 17:17]
Nick White
Please fix this! This bug is also still present in 8.0.22. Just migrated hundreds of tables from MSSQL to MySQL 5.7.32 and wound up with a big mess to fix. None of the AUTO_INCREMENT columns were set after a "successful" migration. Disappointed to find out this is a 17-month-old bug.
[8 Mar 2022 16:25]
Augusto Junior
I have the same issue migrating 96 tables from MSSQL to MySQL. I'll need to alter all the tables, and I have more huge databases to migrate...
[14 Jul 2023 16:19]
Jon Hill
And 8.0.33...
[2 May 2024 10:15]
Simon Hazzard
I've just had the same experience migrating from MySQL to MySQL. Working fix by: removing all foreign keys in related tables modifying the auto-increment field in the affected table (ALTER TABLE <tablenamne> MODIFY id INTEGER NOT NULL AUTO_INCREMENT;) re-creating all foreign keys removed. (I used the same key names etc.) If related tables have no data yet there's no need to remove the foreign key first. For all affected tables.