database: Add payment_custom and v_penalty_business_shares

This commit is contained in:
2024-06-27 13:35:20 +02:00
parent 825938d566
commit c772ddcc12
3 changed files with 37 additions and 6 deletions

View File

@ -149,6 +149,23 @@ CREATE TABLE payment_member (
ON DELETE CASCADE
) STRICT;
-- all values in the table are stored with precision 2!
CREATE TABLE payment_custom (
year INTEGER NOT NULL,
mgnr INTEGER NOT NULL,
amount INTEGER NOT NULL,
comment TEXT,
CONSTRAINT pk_payment_custom PRIMARY KEY (year, mgnr),
CONSTRAINT fk_payment_custom_season FOREIGN KEY (year) REFERENCES season (year)
ON UPDATE CASCADE
ON DELETE CASCADE,
CONSTRAINT fk_payment_custom_member FOREIGN KEY (mgnr) REFERENCES member (mgnr)
ON UPDATE CASCADE
ON DELETE CASCADE
) STRICT;
-- all values in the table are stored with precision 2!
CREATE TABLE credit (
year INTEGER NOT NULL,