-
-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrations failing [db2] #1039
Comments
Hi! We don't officially support DB2 for the CLI yet, but we will be running our tests on it soon and see what changes we have to make. |
Hey! Thanks for the quick answer! Tested with Sequelize CLI [Node: 17.6.0, CLI: 6.4.1, ORM: 6.17.0]
Loaded configuration file "config/config.json".
Using environment "development".
Executing (default): SELECT 1+1 AS result
Executing (default): SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_SCHEMA = 'big_data';
Executing (default): CREATE TABLE IF NOT EXISTS `SequelizeMeta` (`name` VARCHAR(255) NOT NULL UNIQUE , PRIMARY KEY (`name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci;
Executing (default): SHOW INDEX FROM `SequelizeMeta`
Executing (default): SELECT `name` FROM `SequelizeMeta` AS `SequelizeMeta` ORDER BY `SequelizeMeta`.`name` ASC;
Executing (default): CREATE TABLE IF NOT EXISTS `SequelizeMeta` (`name` VARCHAR(255) NOT NULL UNIQUE , PRIMARY KEY (`name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci;
Executing (default): SHOW INDEX FROM `SequelizeMeta`
Executing (default): SELECT `name` FROM `SequelizeMeta` AS `SequelizeMeta` ORDER BY `SequelizeMeta`.`name` ASC;
Executing (default): CREATE TABLE IF NOT EXISTS `SequelizeMeta` (`name` VARCHAR(255) NOT NULL UNIQUE , PRIMARY KEY (`name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci;
Executing (default): SHOW INDEX FROM `SequelizeMeta`
Executing (default): SELECT `name` FROM `SequelizeMeta` AS `SequelizeMeta` ORDER BY `SequelizeMeta`.`name` ASC;
== 20220301095308-create-user-data: migrating =======
Executing (default): CREATE TABLE IF NOT EXISTS `UserData` (`id` INTEGER NOT NULL auto_increment , `user_id` INTEGER, `phrase` VARCHAR(255), `emotions` VARCHAR(255), PRIMARY KEY (`id`)) ENGINE=InnoDB;
Executing (default): CREATE TABLE IF NOT EXISTS `SequelizeMeta` (`name` VARCHAR(255) NOT NULL UNIQUE , PRIMARY KEY (`name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci;
Executing (default): SHOW INDEX FROM `SequelizeMeta`
Executing (default): INSERT INTO `SequelizeMeta` (`name`) VALUES (?);
== 20220301095308-create-user-data: migrated (0.121s)
Done in 0.61s. I did a quick debug, and seems that issue takes place somewhere here: Line 91 in d69a27f
|
Hey @WikiRik! Do you have any updates on this one? |
Not yet, I'll hope to be able to take a look at this in the weekend |
I've been taking a small look at this in #1049 but I'm having some difficulties with getting the test suite to recognize the DB2 server. Probably just need to take a fresh look at this later About the actual issue related to this, feel free to make a PR that solves this issue. |
What you are doing?
What do you expect to happen?
Successful command run
What is actually happening?
Command fails, as Sequelize CLI tries to create table "SequelizeMeta" twice, second creation fails as table with such name already exists.
Dialect: db2
Database version: 11.5.7.0
Sequelize CLI version: 6.4.1
Sequelize version: 6.17.0
The text was updated successfully, but these errors were encountered: