This commit is contained in:
seb
2026-09-29 17:29:13 +02:00
parent ae5d5cc6f8
commit 30820ba8c7
14 changed files with 69 additions and 36 deletions

View File

@@ -627,6 +627,7 @@ CREATE TABLE IF NOT EXISTS propertyname (
company_id INTEGER NOT NULL,
name TEXT NOT NULL,
sort INTEGER NOT NULL DEFAULT 0,
exclusive INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (company_id) REFERENCES company(id) ON DELETE CASCADE,
UNIQUE (company_id, name)
);
@@ -640,8 +641,7 @@ CREATE TABLE IF NOT EXISTS articleproperty (
value TEXT NOT NULL,
sort INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (article_id) REFERENCES article(id) ON DELETE CASCADE,
FOREIGN KEY (property_id) REFERENCES propertyname(id) ON DELETE CASCADE,
UNIQUE (article_id, property_id)
FOREIGN KEY (property_id) REFERENCES propertyname(id) ON DELETE CASCADE
);
`;