Hello users

Im trying to upgrade cloudstack from 4.14.0 to 4.16.0 and the upgrade is
failing because of the db schema upgrade. Any idea on how to fix this.

This is the commit which is causing the issue
https://github.com/apache/cloudstack/pull/4128



2021-04-08 13:59:26,983 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:)
-- Schema upgrade from 4.14.0.0 to 4.15.0.0

2021-04-08 13:59:27,002 ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:)
Error executing: ALTER TABLE `cloud`.`project_account`  ADD COLUMN
`user_id` bigint unsigned COMMENT 'ID of user to be added to the project'
AFTER `account_id`,  ADD CONSTRAINT `fk_project_account__user_id` FOREIGN
KEY `fk_project_account__user_id`(`user_id`) REFERENCES `user`(`id`) ON
DELETE CASCADE,  ADD COLUMN `project_role_id` bigint unsigned COMMENT
'Project role id' AFTER `project_account_id`,  ADD CONSTRAINT
`fk_project_account__project_role_id` FOREIGN KEY (`project_role_id`)
REFERENCES `project_role` (`id`) ON DELETE SET NULL,  DROP FOREIGN KEY
`fk_project_account__account_id`,  DROP INDEX `account_id`
2021-04-08 13:59:27,003 ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:)
java.sql.SQLSyntaxErrorException: Can't DROP
'fk_project_account__account_id'; check that column/key exists
2021-04-08 13:59:27,004 ERROR [c.c.u.DatabaseUpgradeChecker] (main:null)
(logid:) Unable to execute upgrade script
java.sql.SQLSyntaxErrorException: Can't DROP
'fk_project_account__account_id'; check that column/key exists
at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:185)


Caused by: java.sql.SQLSyntaxErrorException: Can't DROP
'fk_project_account__account_id'; check that column/key exists
-- 
Thanks and regards
Rakesh

Reply via email to