Im trying to use AWS SCT to copy the schema of one aws rds mysql database to another aws rds mysql database (same engine). When applying the schema changes via the AWS SCT tool, i get a few errors mostly similiar
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT_GENERATED, updated_at timestamp DEFAULT (CURRENT_TIMESTAMP) DEFAULT_GEN' at line 9
I then compare the schema definition that aws sct is showing with what i can see in mysql workbench and it seems to have replaced CURRENT_TIMESTAMP
with DEFAULT_GENERATED
does anyone know why? The preassessment check mentioned 100% could be copied/converted
aws sct showing the table
CREATE TABLE test.authentication (
id varchar(36) NOT NULL,
...
created_at timestamp DEFAULT (CURRENT_TIMESTAMP) DEFAULT_GENERATED,
updated_at timestamp DEFAULT (CURRENT_TIMESTAMP) DEFAULT_GENERATED on update CURRENT_TIMESTAMP,
deleted_at timestamp DEFAULT NULL,
PRIMARY KEY (id),
CONSTRAINT email_dtype_unique UNIQUE (email, dtype)
);
mysql workbench
CREATE TABLE `authentication` (
`id` varchar(36) NOT NULL,
...
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`deleted_at` timestamp NULL DEFAULT NULL,
`verified` tinyint NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
...
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci