This commit is contained in:
seb
2026-10-11 17:26:11 +02:00
parent 7ffb21aabb
commit 7f4092971d
17 changed files with 3076 additions and 2616 deletions

View File

@@ -463,6 +463,22 @@ BEGIN
END
`;
export const INIT_ATTRIBUTEVALUEPIC = `
IF NOT EXISTS (SELECT * FROM sys.tables WHERE name = 'attributevaluepic')
BEGIN
CREATE TABLE attributevaluepic (
id INT IDENTITY(1,1) PRIMARY KEY,
attributevalue_id INT NOT NULL,
pic_id INT NOT NULL,
sort INT NOT NULL CONSTRAINT DF_attributevaluepic_sort DEFAULT 0,
CONSTRAINT FK_attributevaluepic_attributevalue FOREIGN KEY (attributevalue_id) REFERENCES attributevalue(id) ON DELETE CASCADE,
CONSTRAINT FK_attributevaluepic_pic FOREIGN KEY (pic_id) REFERENCES pic(id) ON DELETE CASCADE,
CONSTRAINT UQ_attributevaluepic_attributevalue_pic UNIQUE (attributevalue_id, pic_id),
CONSTRAINT UQ_attributevaluepic_attributevalue_sort UNIQUE (attributevalue_id, sort)
);
END
`;
export const INIT_ARTICLELISTARTICLE = `
IF NOT EXISTS (SELECT * FROM sys.tables WHERE name = 'articlelistarticle')
BEGIN
@@ -1183,6 +1199,7 @@ export const SCHEMA_SCRIPTS = [
INIT_ARTICLEEAN,
INIT_ARTICLEPIC,
INIT_BRANDPIC,
INIT_ATTRIBUTEVALUEPIC,
INIT_ARTICLELISTARTICLE,
INIT_OPTIONSLISTARTICLE,
INIT_CATEGORYARTICLE,