Add province-scoped branches for loan paid letters and harden loans.user_id.
Expose GET /loan-paid-off-letters/branches?province_id= for form pickers, require loans.user_id, and proxy the Vite frontend under /online/. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
1987d4f596
commit
5f6ddc5217
14 files changed
+172
-343
No files matched your search
@@ -0,0 +1,10 @@
|
||||
-- Require loans.user_id; backfill any existing NULLs to the first user.
|
||||
UPDATE loans
|
||||
SET user_id = (SELECT id FROM users ORDER BY id ASC LIMIT 1)
|
||||
WHERE user_id IS NULL
|
||||
AND EXISTS (SELECT 1 FROM users);
|
||||
|
||||
DELETE FROM loans WHERE user_id IS NULL;
|
||||
|
||||
ALTER TABLE loans
|
||||
ALTER COLUMN user_id SET NOT NULL;
|
||||
Reference in new issue
Block a user