-
Bug
-
Resolution: Won't Fix
-
Low
-
None
-
2.3.0
Currently Stash does not check for the database schema against the build number to ensure it's in a consistent state with the one expected for that version.
In case of a failed upgrade attempt, the db schema can contian extra/new tables that should not be present in a particular version or should only be added after an upgrade. The upgrade fails as the tables already exist (not using a new database schema for the restore). This can leave the database in an inconsistent state.
For example, this error was reported when upgrading from Stash 2.0.3 to 2.3:
2013-04-02 17:32:43,419 ERROR [localhost-startStop-1] liquibase Change Set liquibase/r2_2/m01.xml::STASHDEV-2892-1::tbright failed. Error: Error executing SQL CREATE TABLE `stash`.`sta_configured_hook_status` (`id` INT NOT NULL, `repo_id` INT NULL, `hookkey` VARCHAR(255) NOT NULL, `enabled` TINYINT(1) NOT NULL, CONSTRAINT `PK_STA_CONFIGURED_HOOK_STATUS` PRIMARY KEY (`id`), CONSTRAINT `fk_repository_hook_status` FOREIGN KEY (`repo_id`) REFERENCES stash.repository(id) ON DELETE CASCADE): Table 'sta_configured_hook_status' already exists liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE `stash`.`sta_configured_hook_status` (`id` INT NOT NULL, `repo_id` INT NULL, `hookkey` VARCHAR(255) NOT NULL, `enabled` TINYINT(1) NOT NULL, CONSTRAINT `PK_STA_CONFIGURED_HOOK_STATUS` PRIMARY KEY (`id`), CONSTRAINT `fk_repository_hook_status` FOREIGN KEY (`repo_id`) REFERENCES stash.repository(id) ON DELETE CASCADE): Table 'sta_configured_hook_status' already exists
Manually deleting the 'sta_configured_hook_status' and 'sta_repo_settings' tables helped resolve the issue.
- is related to
-
BSERV-3057 Do a version check of Stash-Home directory before intializing server
-
- Closed
-
-
BSERV-3457 Provide an upgrade path from a beta release for Stash 2.4.x
-
- Closed
-
- mentioned in
-
Page Failed to load
After looking into this issue and the problems that can occur, we don't intend to fix this. We are more likely to add a version number to the DB and check that, which would be much easier and cover the problems that customers reported.