You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running voyager to migrate a set of tables from MySQL (MariaDB 10.5) and identified a possible improvement.
Example:
DROP TABLE IF EXISTS `foo_table`;
CREATE TABLE `foo_table` (
`FOO_ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`BAZ_NM` varchar(250) DEFAULT NULL,
PRIMARY KEY (`FOO_ID`)
);
In the resulting output from Voyager, the table create looks like this:
CREATE TABLE foo_table (
foo_id bigserial,
bar_nm varchar(250),
PRIMARY KEY (foo_id)
) ;
ALTER SEQUENCE foo_table_foo_id_seq RESTART WITH 1;
The original DROP TABLE IF EXISTS is ignored (which I think is a good thing) but I also think it is more appropriate for a Yugabyte DDL to attempt to produce properly idempotent statements as much as possible. At least a configuration option should be able to use CREATE TABLE IF NOT EXISTS syntax instead.
The text was updated successfully, but these errors were encountered:
Running voyager to migrate a set of tables from MySQL (MariaDB 10.5) and identified a possible improvement.
Example:
In the resulting output from Voyager, the table create looks like this:
The original
DROP TABLE IF EXISTS
is ignored (which I think is a good thing) but I also think it is more appropriate for a Yugabyte DDL to attempt to produce properly idempotent statements as much as possible. At least a configuration option should be able to useCREATE TABLE IF NOT EXISTS
syntax instead.The text was updated successfully, but these errors were encountered: