jasperweyne / helpless-kiwi

Manage members, create and manage activities, send mails and more
Apache License 2.0
11 stars 7 forks source link

Error on kiwi DB during creation. #352

Closed mattijsgietman closed 1 year ago

mattijsgietman commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

When I removed the kiwi DB from the phpmyadmin to create this DB again I got the following error (Note* I didn't get this error on an older version of kiwi):

Migration 20221202230206 failed during Execution. Error An exception occurred while executing 'ALTER TABLE kiwi_relation DROP id, DROP parent_id, DROP description, CHANGE person_id person_id CHAR(36) NOT NULL COMMENT '(DC2Type:guid)'':

SQLSTATE[HY000]: General error: 1832 Cannot change column 'person_id': used in a foreign key constraint 'FK_31E0BAB217BBB47'

In AbstractMySQLDriver.php line 128:

An exception occurred while executing 'ALTER TABLE kiwi_relation DROP id, DROP parent_id, DROP description, CHANGE person_id person_id CHAR(36) NOT NULL COMMENT '(DC2Type:guid)'':

SQLSTATE[HY000]: General error: 1832 Cannot change column 'person_id': used in a foreign key constraint 'FK_31E0BAB 217BBB47'

In Exception.php line 18:

SQLSTATE[HY000]: General error: 1832 Cannot change column 'person_id': used in a foreign key constraint 'FK_31E0BAB 217BBB47'

In PDOConnection.php line 141:

SQLSTATE[HY000]: General error: 1832 Cannot change column 'person_id': used in a foreign key constraint 'FK_31E0BAB 217BBB47'

doctrine:migrations:migrate [--write-sql [WRITE-SQL]] [--dry-run] [--query-time] [--allow-no-migration] [--all-or-nothing [ALL-OR-NOTHING]] [--configuration [CONFIGURATION]] [--db-configuration [DB-CONFIGURATION]] [--db DB] [--em EM] [--shard SHARD] [--] []

Script php bin/console doctrine:migrations:migrate -n handling the db-rebuild event returned with error code 1 Script @db-rebuild was called via db-rebuild-dev

To Reproduce Steps to reproduce the behavior:

  1. Be sure to be on the latest version of kiwi
  2. Drop the DB from phpmyadmin
  3. Try to recreate the DB with 'composer db-rebuild-dev'

Expected behavior (Re)create the DB for kiwi and adding the Admin and normal user account

Screenshots

image

.

A-Daneel commented 1 year ago

Just to confirm, this was on the develop branch? I can't seem to reproduce the issue on my machine. (composer db-rebuild-dev runs normally)

mattijsgietman commented 1 year ago

Hi @A-Daneel worked with @mkrugr on this. A fix can be found in PR: https://github.com/jasperweyne/helpless-kiwi/pull/355

A-Daneel commented 1 year ago

This should be solved by #358