Help Center> Database and Application Migration UGO> User Guide> Conversion Configuration> Migration Configurations> Editing the Configurations During Migration from GoldenDB to GaussDB
Updated on 2024-05-28 GMT+08:00

Editing the Configurations During Migration from GoldenDB to GaussDB

Symptom

Feature Name

Recommended Setting

GaussDB 3.2 Enterprise Edition and later versions support the character set of specified tables.

CHARSET

If the target database does not support CHARSET, comment CHARSET.

GaussDB 3.2 Enterprise Edition and later versions support COLLATE of specified tables.

COLLATE

If the target database does not support COLLATE, comment COLLATE.

GaussDB does not support SECURITY clauses in views.

SQL SECURITY clauses

Migrate SECURITY clauses.

GaussDB does not support CHECK OPTION clauses in views.

CHECK OPTION clauses

Migrate CHECK OPTION clauses.

GaussDB does not support ON UPDATE in columns of tables.

ON UPDATE

Migrate the script and use triggers to implement ON UPDATE.

The distributed GaussDB does not support generated columns.

Generated columns

NOTE:

This feature is available only in distributed GaussDB.

Comment expressions for generated columns and convert generated columns to common column. Triggers are used to configure this feature.

In GaussDB, multiple columns cannot be used as the partition key in a table.

Multi-column partition keys of partitioned tables

Use the first column of the primary key or unique key as the partition key.

In GaussDB, partition keys cannot be same as sub-partition keys.

Same partition keys and sub-partition keys

Comment SUB partitions.

GaussDB temporary tables do not support AUTO INCREMENT.

AUTO INCREMENT in temporary tables

Comment AUTO INCREMENT.

Distributed GaussDB does not support FOREIGN KEY constraints.

FOREIGN KEY constraints

NOTE:

This feature is available only in distributed GaussDB.

Comment FOREIGN KEY constraints.

GaussDB does not support DEFINER in database objects.

Definer

If a user is specified when an object is created, convert it to ALTER OWNER.

Data types are enlarged after being converted by UGO.

CHECK constraints

Add CHECK constraints.

GaussDB does not support system privileges. No system privileges will be given.

System privileges

Comment the entire SQL script.

GaussDB does not support unsigned floating-point numbers and fixed-point numbers.

UNSIGNED FLOATING-POINT and FIXED-POINT type

Comment the UNSIGNED and ZEROFILL attributes.

GaussDB does not support the ZEROFILL keyword.

ZEROFILL keyword

Comment ZEROFILL. If UNSIGNED does not exist, add UNSIGNED.

After stored procedures and functions are converted during the migration from MySQL to GaussDB, you can add keywords to statements.

Adding the keyword or replace to a stored procedure or function

Do not add or replace after the keyword create for a function or stored procedure.

The primary key or unique key in GaussDB must be a superset of distribution keys.

RANGE/LIST distribution

NOTE:

This feature is available only in distributed GaussDB.

Add distribution keys specified RANGE or LIST distribution clauses to primary keys.

GaussDB does not support LONGBLOB data type in CREATE TABLE statements.

LONGBLOB

Migrate the script and convert LONGBLOB to BYTEA.

DML operations are not blocked during index creation.

CONCURRENTLY clause in CREATE INDEX statement

Recommended value: Add the keyword CONCURRENTLY.

Impact: When such indexes are created, there may be deadlocks. It takes longer to create an Astore table index than a normal table index.

GaussDB does not allow reserved keywords that are not quoted by double quotation marks to be used as object names.

Reserved keyword object names case format

NOTE:

The priority is higher than case conversion for object names.

If an object name contains reserved keywords, convert the case of the name to uppercase letters.

The uniqueness scope of GaussDB indexes and constraints is different from that of MySQL indexes and constraints. When a conflict occurs, you can select this configuration to configure mapping strategies for index/constraint names to ensure uniqueness.

Prevent index/constraint names collision

Recommended value: Concat the table name with the index or constraint name to prevent name conflicts. If the concatenated name exceeds 63 bytes, perform a hash on the name using SHA-1.

Impact: The name conflict and ultra-long problems are solved. However, when the combined name is too long, the readability of the name is lost.