U0400010: GaussDB Distributed does not support AUTO_INCREMENT
Description
Database Type and Version
- Source database type and version: MySQL 5.5, 5.6, 5.7, and 8.0
- Target database type and version: GaussDB Distributed
Syntax Example
This error is reported because UGO does not convert AUTO_INCREMENT of a column by default during migration to GaussDB Distributed.
When a table is defined in a distributed GaussDB database compatible with MySQL, the AUTO_INCREMENT attribute cannot be specified for a column, for example:
CREATE TABLE auto_increment_test ( id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(64) );
Suggestion
1. Modify Support for AUTO_INCREMENT.
2. GaussDB also provides sequence integers to implement auto-increment columns. You can manually change the original AUTO_INCREMENT column to a sequence integer column. The integers are stored in sequence. When custom data is inserted into an auto-increment column in a MySQL database, the auto-increment column automatically increases from the current maximum value. The custom sequence or sequence integer column in a GaussDB database always increases from the current value of the sequence.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot