-
Notifications
You must be signed in to change notification settings - Fork 334
Description
[x]: This is a bug and not a question.
[x]: I understand that the best way to resolve this issue is to solve it and propose a Pull Request.
Describe the bug**
Fresh Docker install (using official image librebooking/librebooking:develop or :4.0.0) completes the web installer, writes config.php, creates admin account, but many schema upgrades fail partially or silently.
This results in numerous runtime errors when using the application (login succeeds, but almost every page/feature throws "Unknown column" or "Table doesn't exist" exceptions).
To Reproduce
- Use a clean Docker Compose setup with
librebooking/librebooking:develop(or:4.0.0) +mariadb:10.6 - Run
docker compose up -d - Open http://localhost:8081/Web/install/
- Complete the installer (use correct DB credentials, create admin account, include sample data or not — both tested)
- Finish installation → redirected to login
- Log in as admin
- Observe errors on dashboard, view resources, etc.
Observed errors (examples from logs after login/dashboard load):
Unknown column 'display_page' in 'WHERE'→AnnouncementRepository.php:11Unknown column 'urp.permission_type' in 'SELECT'→UserRepository.php:662Unknown column 'grp.permission_type' in 'SELECT'→ResourceRepository.php:474Table 'librebooking.resource_images' doesn't exist→ResourceRepository.php:58Undefined array key "isdefault"→GroupRepository.php:298- Earlier installer failures: column count mismatch in
layoutsinsert, errno 194 tablespace missing during ALTERs, foreign key constraint blocks on DROP/DISCARD
Expected behavior
Fresh install should apply full schema (all tables + all upgrade scripts) without errors. Login and dashboard should load cleanly.
Actual behavior
Installer reports success on most steps, but many upgrade scripts fail (e.g. 2.7 schema.sql, 2.9 schema.sql, create-data.sql).
Result: partial schema → runtime SQL errors on nearly every page until missing columns/tables are manually added.
Environment
- Docker Compose on Windows 11 (Docker Desktop with WSL2 backend)
- App image:
librebooking/librebooking:develop(also tested:4.0.0) - DB image:
mariadb:10.6(also testedlinuxserver/mariadb:10.6.13) - PHP: 8.4.1 (from container logs)
- MariaDB: 10.6.13
- Browser: Firefox 147.0 (also tested Chrome)
Workaround / Fix that worked for me
Manually add missing columns/tables after installer completes:
announcements.display_page→TINYINT(1) DEFAULT 1user_resource_permissions.permission_type→ENUM('view','reserve','manage') DEFAULT 'reserve'group_resource_permissions.permission_type→ same as aboveresource_imagestable (full CREATE with matchingresource_id SMALLINT(5) UNSIGNED)groups.isdefault→TINYINT(1) UNSIGNED DEFAULT 0
After patching ~5–6 pieces, the app works without errors.
Additional context
- Errors often related to InnoDB tablespace rename failures (errno 194) during ALTER in upgrade scripts → possibly Windows/Docker volume filesystem issue (9p)
- Sample data import fails on
layoutsinsert (column count mismatch) - Using
:4.0.0stable tag reduces (but does not eliminate) issues - Related open issue: Database schema is missing tables and columns for tables #855 ("Database schema is missing tables and columns")
Would be great if the installer could be more resilient (e.g. continue on SQL failure, log detailed errors, or have a "repair schema" button).
Thanks for the great project — once patched it runs nicely!