Skip to content
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

upgrading from 2.7 #845

Closed
1 task
steveweg opened this issue Nov 20, 2019 · 5 comments
Closed
1 task

upgrading from 2.7 #845

steveweg opened this issue Nov 20, 2019 · 5 comments

Comments

@steveweg
Copy link

steveweg commented Nov 20, 2019

Baikal version: 2.70

  • I have searched open and closed issues for duplicates
  • [x ] I have installed the release zip, not the source code zip
  • [x ] I have moved the whole, untouched Specific folder to the new installation

Problem:

First of all I really like to see someone is still developing this fine art software. Running since years on my Syno without Problems.
Changing my Syno, restored the backup an the tried to update from 2.7 to 6.1 leads to the following lines after starting the Baikal upgrade Wizard:

Uncaught exception during upgrade: PDOException: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'synctoken' in /volume1/web/baikal.app/Core/Frameworks/BaikalAdmin/Controller/Install/VersionUpgrade.php:104 
Stack trace:
#0 /volume1/web/baikal.app/Core/Frameworks/BaikalAdmin/Controller/Install/VersionUpgrade.php(104): PDO->exec('ALTER TABLE cal...')
#1 /volume1/web/baikal.app/Core/Frameworks/BaikalAdmin/Controller/Install/VersionUpgrade.php(61): BaikalAdmin\Controller\Install\VersionUpgrade->upgrade('0.2.7', '0.6.1')
#2 /volume1/web/baikal.app/Core/Frameworks/Flake/Core/Render/Container.php(69): BaikalAdmin\Controller\Install\VersionUpgrade->render()
#3 /volume1/web/baikal.app/Core/Frameworks/Flake/Controller/Page.php(85): Flake\Core\Render\Container->renderBlocks()
#4 /volume1/web/baikal.app/html/admin/install/index.php(92): Flake\Controller\Page->render()
#5 {main}

I dont't know how to handle this.
Any idea ?

@ByteHamster
Copy link
Member

Hi,

this means that the database is in a state that Baikal does not expect it to be. Most likely, this happened because of a failed upgrade attempt in the past.

The only possible solution I can currently think of is to manually upgrade Baikal and your database to version 0.3.0 and then try again to go from this version to 0.6.1. Unfortunately, the jump from 0.2.7 to 0.3.0 contains a significant number of database changes that are probably not easy to execute. You can find the code for the database upgrades in the file Core/Frameworks/BaikalAdmin/Controller/Install/VersionUpgrade.php.

I can help you if you have questions about specific steps but it might be hard if you have not worked with php and mysql before. In any case, if you attempt to do the upgrade manually, please create a backup of your database and the Specific folder. Depending on the number of users/calendars you have, it might be easier to export contacts and calendar entries (e.g. using Thunderbird), setting up the server from scratch and then re-importing the entries again. In case you go down this path, also make sure to create a backup of your old Baikal installation, in case you forgot to copy something.

New versions of Baikal ask before attempting an upgrade (and suggest to make a backup), so the problem of having a partially upgraded database like yours is reduced in the future.

@steveweg
Copy link
Author

Hi
Upgrading to 0.3.3 fails with Baikal Tool is locked, although i have a file named ENABLE_INSTALL (uppercase, no file extension) in the Specific/ folder of Baïkal.
Tried to delete & copied it several times.

@steveweg
Copy link
Author

OK, created a new file, now it leads to a new error:

Upgrading Baïkal from version 0.2.7 to version 0.3.3
Errors
Uncaught exception during upgrade: PDOException: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'synctoken' in /volume1/web/baikal.app/Core/Frameworks/BaikalAdmin/Controller/Install/VersionUpgrade.php:165 Stack trace: #0 /volume1/web/baikal.app/Core/Frameworks/BaikalAdmin/Controller/Install/VersionUpgrade.php(165): PDO->exec('ALTER TABLE cal...') #1 /volume1/web/baikal.app/Core/Frameworks/BaikalAdmin/Controller/Install/VersionUpgrade.php(60): BaikalAdmin\Controller\Install\VersionUpgrade->upgrade('0.2.7', '0.3.3') #2 /volume1/web/baikal.app/Core/Frameworks/Flake/Core/Render/Container.php(70): BaikalAdmin\Controller\Install\VersionUpgrade->render() #3 /volume1/web/baikal.app/Core/Frameworks/Flake/Controller/Page.php(84): Flake\Core\Render\Container->renderBlocks() #4 /volume1/web/baikal.app/admin/install/index.php(84): Flake\Controller\Page->render() #5 {main}

@steveweg
Copy link
Author

OK, tried it with a complete new install of 6.1 and a new DB (baikalNew).
my old DB still exists (baikalOld). when i dump Old & try to insert in New i get lots of errors caused by non existing columns in New tables.

@steveweg
Copy link
Author

got all my data back from Backup with a little help from phpmyadmin and now i have all my contacts & vents back on my several units...
my Syno still tells me Baikal 2.7 is running but this is not hurting me ;-))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants