0013390: container_id update script problems #6624

Closed
Gloirin opened this Issue Jun 9, 2018 · 3 comments

Comments

Projects
None yet
1 participant
@Gloirin

Gloirin commented Jun 9, 2018

Reported by koelschejung on 11 Aug 2017 14:59

Version: 2017.08.2 Community Edition

I updated from Ubuntu-Repository, if i update the databases in setup, i get erros by update tinebase.
(Sorry my english is not so good, ich habe eben aus den Ubuntu Quellen aktualisiert. Beim Aktualisierung der DB der Pakete schlägt es bei Tinebase fehl.)

(Im log finde ich folgenden Eintrag: )
Here is the error-log:
e4916 setupuser - 2017-08-10T15:25:17+00:00 ERR (3): Tinebase_Exception::log::104 Zend_Db_Statement_Exception -> SQLSTATE[HY000]: General error: 1005 Can't create table schoenberg.#sql-40e_94e6 (errno: 150 "Foreign key constraint is incorrectly formed"), query was: ALTER TABLE tine20_cal_resources ADD CONSTRAINT tine20_cal_resources::container_id--container::id FOREIGN KEY (container_id) REFERENCES tine20_container (id)

Andere User haben das gleiche Problem:

https://www.tine20.org/forum/viewtopic.php?f=12&t=18528&p=66856#p66856

Nach dem ich die DB wieder zurückgespielt habe und das Paket Tinebase, als erstes aktualisiert habe, ging es bei mir durch. Bei anderen leider nicht.

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by WolfgangAndreas on 11 Aug 2017 21:14

Hello,

i could fix this by manually updating the sql-tables.

It seems, that the data type of the first named column (in the above case: table=tine20_cal_resources, column=container_id) was not changed from int() to varchar(40).
I manually changed this via phpmyadmin and now everything is working fine.
(If you are doing, too, do not forget to set the "Attribute" to "<empty>").

Had to do the above steps for about 3-5 more tables, but didn't note the names.

Updating the data types should be checked during the upgrade-procedure.

Kind regards,
Wolfgang

Gloirin commented Jun 11, 2018

Comment posted by WolfgangAndreas on 11 Aug 2017 21:14

Hello,

i could fix this by manually updating the sql-tables.

It seems, that the data type of the first named column (in the above case: table=tine20_cal_resources, column=container_id) was not changed from int() to varchar(40).
I manually changed this via phpmyadmin and now everything is working fine.
(If you are doing, too, do not forget to set the "Attribute" to "<empty>").

Had to do the above steps for about 3-5 more tables, but didn't note the names.

Updating the data types should be checked during the upgrade-procedure.

Kind regards,
Wolfgang

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by pmehrer on 14 Aug 2017 09:34

Hello,

the issue is that Tinebase must be updated first and actually in this case all (precisely: some affected) applications need to be updated in one run (!). We created a separate task to enforce this in the setup. (https://forge.tine20.org/view.php?id=13392)

To resolve this manually I would strongly advice not to alter the table structure manually! The right way to resolve this, is to set back the application version as listed below and then do an update for all application in one run.

So if you run partial updates (which will be not be possible anymore in the near future) please check the application versions (tine20_applications table). If they are higher than the versions listed here, set them back to the listed version:
Addressbook: 10.5
Calendar: 10.7
Crm: 10.1
Events: 10.1
Projects: 10.1
Sales: 10.8
SimpleFAQ: 10.0
Tasks: 10.1
Timetracker: 10.2

then do a full update of all applications in one run!

best regards
Paul

Gloirin commented Jun 11, 2018

Comment posted by pmehrer on 14 Aug 2017 09:34

Hello,

the issue is that Tinebase must be updated first and actually in this case all (precisely: some affected) applications need to be updated in one run (!). We created a separate task to enforce this in the setup. (https://forge.tine20.org/view.php?id=13392)

To resolve this manually I would strongly advice not to alter the table structure manually! The right way to resolve this, is to set back the application version as listed below and then do an update for all application in one run.

So if you run partial updates (which will be not be possible anymore in the near future) please check the application versions (tine20_applications table). If they are higher than the versions listed here, set them back to the listed version:
Addressbook: 10.5
Calendar: 10.7
Crm: 10.1
Events: 10.1
Projects: 10.1
Sales: 10.8
SimpleFAQ: 10.0
Tasks: 10.1
Timetracker: 10.2

then do a full update of all applications in one run!

best regards
Paul

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by pschuele on 14 Aug 2017 11:19

http://gerrit.tine20.com/customers/#/c/5461/

Gloirin commented Jun 11, 2018

Comment posted by pschuele on 14 Aug 2017 11:19

http://gerrit.tine20.com/customers/#/c/5461/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment