This commit is contained in:
seb
2026-08-01 03:37:45 +02:00
parent 69a24192d3
commit 1756dc7ef0
10 changed files with 179 additions and 13 deletions

View File

@@ -92,7 +92,8 @@ BEGIN
thumbhash NVARCHAR(64) NOT NULL,
source NVARCHAR(MAX) NOT NULL,
fullbinary VARBINARY(MAX) NOT NULL,
thumbbinary VARBINARY(MAX) NOT NULL
thumbbinary VARBINARY(MAX) NOT NULL,
CONSTRAINT UQ_pic_hash UNIQUE (hash)
);
END
`;
@@ -440,7 +441,7 @@ BEGIN
CREATE TABLE manifestarticle (
id INT IDENTITY(1,1) PRIMARY KEY,
manifest_id INT NOT NULL,
article_id INT NOT NULL,
article_id INT NULL,
amount FLOAT NOT NULL,
net FLOAT NOT NULL,
transactedamount FLOAT NOT NULL,
@@ -448,7 +449,7 @@ BEGIN
rebate FLOAT NOT NULL CONSTRAINT DF_manifestarticle_rebate DEFAULT 0,
tax_id INT NOT NULL,
CONSTRAINT FK_manifestarticle_manifest FOREIGN KEY (manifest_id) REFERENCES manifest(id) ON DELETE CASCADE,
CONSTRAINT FK_manifestarticle_article FOREIGN KEY (article_id) REFERENCES article(id) ON DELETE CASCADE,
CONSTRAINT FK_manifestarticle_article FOREIGN KEY (article_id) REFERENCES article(id) ON DELETE SET NULL,
CONSTRAINT FK_manifestarticle_tax FOREIGN KEY (tax_id) REFERENCES tax(id) ON DELETE CASCADE
);
END