From b0ed337862415b88e9e3578ca59036460c16204f Mon Sep 17 00:00:00 2001 From: m17hr1l Date: Thu, 14 May 2026 13:05:19 +0200 Subject: [PATCH] Fix user_to_acl column names in 03-default-users.sql MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- db/03-default-users.sql | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/db/03-default-users.sql b/db/03-default-users.sql index 835f918..501796b 100644 --- a/db/03-default-users.sql +++ b/db/03-default-users.sql @@ -19,7 +19,10 @@ VALUES '$argon2id$v=19$m=65536,t=4,p=1$YmxWaHpqaHRsU1dmZHFUOA$k8veR56hGcoTsciZGVYv/NuPJSyQ3wgzSTyryW/ynto', 1); --- 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 +-- Grant admin user superuser ACL (acl_id=1 from the acl seed data). +-- 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 (2, 3); -- testuser → user