updated scheme and created mock data script

This commit is contained in:
2026-02-14 19:13:55 +01:00
parent 06976f7972
commit 5e0e492dcf
2 changed files with 133 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ CREATE TABLE loans (
deleted bool NOT NULL DEFAULT false,
note varchar(500) DEFAULT NULL,
PRIMARY KEY (id),
FOREIGN KEY (username) REFERENCES users(username),
CHECK (loan_code REGEXP '^[0-9]{6}$')
) ENGINE=InnoDB;