Skip to content

Commit

Permalink
engine/schema: remove unnecessary code to fix installation on ubuntu2…
Browse files Browse the repository at this point in the history
…0/mariadb10

2023-10-19 12:47:29,711 ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:) Error executing: alter table storage_pool modify id bigint unsigned AUTO_INCREMENT UNIQUE NOT NULL
2023-10-19 12:47:29,719 ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:) java.sql.SQLException: Cannot change column 'id': used in a foreign key constraint 'fk_storage_pool_details__pool_id' of table 'cloud.storage_pool_details'
2023-10-19 12:47:29,722 ERROR [c.c.u.DatabaseUpgradeChecker] (main:null) (logid:) Unable to execute upgrade script
java.sql.SQLException: Cannot change column 'id': used in a foreign key constraint 'fk_storage_pool_details__pool_id' of table 'cloud.storage_pool_details'
 at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:185)

However, The table storage_pool has already the correct definition

CREATE TABLE  `cloud`.`storage_pool` (
  `id` bigint unsigned UNIQUE NOT NULL,
  `name` varchar(255) COMMENT 'should be NOT NULL',
  `uuid` varchar(255) UNIQUE,
...
  • Loading branch information
weizhouapache committed Oct 24, 2023
1 parent a8700bf commit f05d174
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ alter table vm_template add update_count bigint unsigned;
alter table vm_template add updated datetime;
alter table storage_pool add storage_provider_id bigint unsigned;
alter table storage_pool add scope varchar(255);
alter table storage_pool modify id bigint unsigned AUTO_INCREMENT UNIQUE NOT NULL;
alter table template_spool_ref add state varchar(255);
alter table template_spool_ref add update_count bigint unsigned;
alter table volumes add disk_type varchar(255);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ alter table vm_template add update_count bigint unsigned;
alter table vm_template add updated datetime;
alter table storage_pool add storage_provider_id bigint unsigned;
alter table storage_pool add scope varchar(255);
alter table storage_pool modify id bigint unsigned AUTO_INCREMENT UNIQUE NOT NULL;
alter table template_spool_ref add state varchar(255);
alter table template_spool_ref add update_count bigint unsigned;
alter table volumes add disk_type varchar(255);
Expand Down

0 comments on commit f05d174

Please sign in to comment.