-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
When creating a fresh install of EB with a fresh database, the migrations don't seem to work correctly. Specifically, the database migration
ALTER TABLE sso_provider_roles_eb5
CHANGE coins coins JSON NOT NULL COMMENT '(DC2Type:engineblock_metadata_coins)',
CHANGE mdui mdui JSON NOT NULL COMMENT '(DC2Type:engineblock_metadata_mdui)';
seem to be a noop, and Doctrine keep trying to reapply it.
To reproduce using Openconext-devconf:
- clean out all dockers
docker rm -f $(docker ps -aq) - clear db server
docker volume prune -a - start init script
cd core; ./scripts/init.sh - db and engine container will boot and database will be created
- then check the database schema:
╰─▶ docker compose exec engine /var/www/html/bin/console doctrine:schema:validate --skip-mapping --env=prod
[ERROR] The database schema is not in sync with the current mapping file.
- update the database:
╰─▶ docker compose exec engine /var/www/html/bin/console doctrine:schema:update --dump-sql
ALTER TABLE sso_provider_roles_eb5 CHANGE coins coins JSON NOT NULL COMMENT '(DC2Type:engineblock_metadata_coins)', CHANGE mdui mdui JSON NOT NULL COMMENT '(DC2Type:engineblock_metadata_mdui)';
╰─▶ docker compose exec engine /var/www/html/bin/console doctrine:schema:update --force
Updating database schema...
1 query was executed
[OK] Database schema updated successfully!
- again check if the database is up to date:
╰─▶ docker compose exec engine /var/www/html/bin/console doctrine:schema:validate --skip-mapping --env=prod
Database
--------
[ERROR] The database schema is not in sync with the current mapping file.
╰─▶ docker compose exec engine /var/www/html/bin/console doctrine:schema:update --dump-sql
ALTER TABLE sso_provider_roles_eb5 CHANGE coins coins JSON NOT NULL COMMENT '(DC2Type:engineblock_metadata_coins)', CHANGE mdui mdui JSON NOT NULL COMMENT '(DC2Type:engineblock_metadata_mdui)';
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Backlog