Fix user_to_acl column names in 03-default-users.sql

The user_to_acl table is one of the few join tables that does NOT follow
the tablename_fieldname column naming convention — its columns are the
plain `user_id` and `acl_id`. The previous version used `user_to_acl_user_id`
and `user_to_acl_acl_id` which fail with "Unknown column".

Found by actually running bootstrap-db.sh end-to-end against a fresh DB
(was missing this verification step on the initial commit).

Verified now:
  - schema loads cleanly (36 tables)
  - seed loads (3 ACL roles, 8 email templates)
  - default users insert + ACL mapping works
  - password_verify against argon2id hashes confirms admin123 and test123
This commit is contained in:
2026-05-14 13:05:19 +02:00
parent 8932534623
commit b0ed337862

View File

@@ -19,7 +19,10 @@ VALUES
'$argon2id$v=19$m=65536,t=4,p=1$YmxWaHpqaHRsU1dmZHFUOA$k8veR56hGcoTsciZGVYv/NuPJSyQ3wgzSTyryW/ynto', '$argon2id$v=19$m=65536,t=4,p=1$YmxWaHpqaHRsU1dmZHFUOA$k8veR56hGcoTsciZGVYv/NuPJSyQ3wgzSTyryW/ynto',
1); 1);
-- Grant admin user superuser ACL (acl_id=1 from the acl seed data) -- Grant admin user superuser ACL (acl_id=1 from the acl seed data).
INSERT INTO `user_to_acl` (`user_to_acl_user_id`, `user_to_acl_acl_id`) VALUES -- NOTE: user_to_acl is one of the join tables in the schema that does NOT
-- follow the tablename_fieldname column convention — its columns are the
-- plain `user_id` and `acl_id`.
INSERT INTO `user_to_acl` (`user_id`, `acl_id`) VALUES
(1, 1), -- admin → superuser (1, 1), -- admin → superuser
(2, 3); -- testuser → user (2, 3); -- testuser → user