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

Error while Upgrading #771

Closed
Martin555 opened this issue Feb 27, 2019 · 18 comments
Closed

Error while Upgrading #771

Martin555 opened this issue Feb 27, 2019 · 18 comments

Comments

@Martin555
Copy link

Hi,
I just tried to upgrade from Baikal Flat 0.2.7 to 0.4.6, but ran into an error.
I tried both deleting the new Specific folder plus copying the old Specific folder over and also copying the new files to a copy of the old folder (without the new Specific folder) but both caused the following issue.
I'm using MySQL and the settings, visible in the attachments:
1
2
3

Thank you!

ERROR-MESSAGE:
Uncaught exception during upgrade: exception 'PDOException' with message 'SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'synctoken'' in /var/www/html/baikalnew/Core/Frameworks/BaikalAdmin/Controller/Install/VersionUpgrade.php:102 Stack trace: #0 /var/www/html/baikalnew/Core/Frameworks/BaikalAdmin/Controller/Install/VersionUpgrade.php(102): PDO->exec('ALTER TABLE cal...') #1 /var/www/html/baikalnew/Core/Frameworks/BaikalAdmin/Controller/Install/VersionUpgrade.php(61): BaikalAdmin\Controller\Install\VersionUpgrade->upgrade('0.2.7', '0.4.6') #2 /var/www/html/baikalnew/Core/Frameworks/Flake/Core/Render/Container.php(71): BaikalAdmin\Controller\Install\VersionUpgrade->render() #3 /var/www/html/baikalnew/Core/Frameworks/Flake/Controller/Page.php(85): Flake\Core\Render\Container->renderBlocks() #4 /var/www/html/baikalnew/html/admin/install/index.php(83): Flake\Controller\Page->render() #5 {main}

@Martin555
Copy link
Author

Btw the upgrade also altered and destroyed the MySQL database (but of course I have a backup).
In the webpanel it still showed the correct users and calendars/addressbooks, but sync was not possible.
And when trying to export a calendar, it gave me this error message:
URL: https://example.de/cal.php/calendars/userXY/default?export
Sabre\DAV\Exception\NotFound
Calendar with name 'default' could not be found
1.8.7

@derStephan
Copy link

derStephan commented Apr 23, 2019

Did you try any of the solutions given in #716 or #708 or #683 or #665 or #573?

@ByteHamster
Copy link
Member

@Martin555 Looks like, in the past, the upgrade was already attempted but not completed. Therefore, the column synctoken is already present in you database and Baikal tries to recreate the column. Fixing the issue is going to be quite some manual work. We have to find out where the upgrade was aborted and comment-out the steps that were already executed. The upgrade code can be found in the following file:

if (version_compare($sVersionFrom, '0.3.0', '<')) {

Are you still interested in resolving this issue?

@Martin555
Copy link
Author

Martin555 commented May 4, 2019

Did you try any of the solutions given in #716 or #708 or #683 or #665 or #573?

Many thanks for your help @derStephan , I have not tried those solutions yet, but judging by the comment of @ByteHamster , I remember that indeed the upgrade process aborted at some point.

I'm still interested in solving the upgrade to be able to use the new features of Baikal.
Would it therefore be possible to provide you with the regarding log files or parts of the database, so you can tell me to which point the update came before aborting and respectively which part of the script can be commented out?
Otherwise, if the "manual work" exceeds the effort of just exporting and re-importing all 7 calendars and 7 address books, I'd be glad to get this solution suggested by you as well.

Thanks!

@ByteHamster
Copy link
Member

ByteHamster commented May 4, 2019

So, let's find out how far it got. If the answer to one of the questions is "No", you don't have to proceed further down the list. You can just tell me the first bullet point with the answer "No" :)

(to 0.3.0)

  • Does your calendars table have a column synctoken?
  • Does your addressbooks table have a column synctoken?
  • Do you have a table named calendarsubscriptions?
  • Do you have a table named cards?
  • Do you have a table named schedulingobjects?
  • Do you have a table named propertystorage?

(to 0.4.0)

  • Do you have a table named calendars_XXXXXXX? (XXX is a number/unix time)

(to 0.4.5)

  • Do you have a table named addressbooks_XXXXXXX? (XXX is a number/unix time)

(to 0.5.1)

  • Do you have a table named calendarinstances?

@beowulf222
Copy link

beowulf222 commented Jun 16, 2019

Sorry for digging up an older post, but I am moving servers and was going to reinstall Baikal 0.4.6, which works fine.

However, the upgrade to 0.5.1 doesn't work. The error pertains to the missing table of calendarinstances

My currently used database with 0.4.6 has the following tables. As you will see, I already miss the tables calendars_XXXXXXX and addressbooks_XXXXXXX

mysql> show tables;
+-----------------------+
| Tables_in_baikal   |
+-----------------------+
| addressbookchanges    |
| addressbooks          |
| calendarchanges       |
| calendarobjects       |
| calendars             |
| calendarsubscriptions |
| cards                 |
| groupmembers          |
| locks                 |
| principals            |
| propertystorage       |
| schedulingobjects     |
| users                 |
+-----------------------+

Any pointers on how to trigger the upgrade?

@ByteHamster
Copy link
Member

ByteHamster commented Jun 16, 2019

Did you manually change Specific/Config.system.php? (you should not do that)

@beowulf222
Copy link

Did you manually change Specific/Config.system.php? (you should not do that)

No, I didn't change it manually. I re-set my Baikal to version 0.4.6 and used the existing database (re-imported it).

@ByteHamster
Copy link
Member

Okay, what is your configured version in that file?

@beowulf222
Copy link

Okay, what is your configured version in that file?

0.4.6

@ByteHamster
Copy link
Member

Hmm, then Baikal should automatically upgrade. Just copy over the whole specific folder to the new installation. Version 0.5.2 upgrades when loading the admin interface for the first time (do not interrupt!), version 0.5.3 (recommended) asks you first.

@beowulf222
Copy link

OK, I have an idea where I took a wrong a turn and skipped the upgrade because the documentation is not so clear. Do I have to leave the Specific directory intact and copy it from my existing Baikal directory into the new one?

@ByteHamster
Copy link
Member

Yes, you need to use the whole, untouched Specific directory with the new installation. You can either make a backup and overwrite everything except the Specific directory or download a fresh Baikal installation and copy over the Specific directory.

@beowulf222
Copy link

Yes, you need to use the whole, untouched Specific directory with the new installation. You can either make a backup and overwrite everything except the Specific directory or download a fresh Baikal installation and copy over the Specific directory.

Yep, that was the solution - or rather that was my mistake (I overwrote the Specific directory).

@beowulf222
Copy link

Well, I upgraded a couple of packages on my server (Ubuntu 18.04.2 LTS) and broke my Baikal installation.

I am not getting this:
Baïkal dependencies have not been installed. Please, execute "composer install" in the folder where you installed Baïkal.

It seems like dependencies are missing?

@ByteHamster
Copy link
Member

Sounds like you downloaded the wrong release zip. There are 2. One with dependencies and one that is created automatically by GitHub without dependencies.

@beowulf222
Copy link

I downloaded this one [https://github.com/sabre-io/Baikal/releases/download/0.5.3/baikal-0.5.3.zip]
But I don't fully get it why it worked earlier and now is making this issues.

@ByteHamster
Copy link
Member

Check if the vendor folder got copied over correctly. If you still have questions, please open another issue to prevent spamming the original author of this issue who still wants to have his problem solved.

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

4 participants