u
This commit is contained in:
@@ -32,6 +32,7 @@ export const ARTICLE_LIST_COLUMNS = `
|
||||
pr.net,
|
||||
t.rate AS taxRate,
|
||||
a.track_stock,
|
||||
a.is_father AS isFather,
|
||||
CASE
|
||||
WHEN a.optionslist_id IS NOT NULL THEN (
|
||||
SELECT COUNT(*)
|
||||
|
||||
@@ -1029,7 +1029,7 @@ BEGIN
|
||||
value NVARCHAR(MAX) NOT NULL,
|
||||
sort INT NOT NULL CONSTRAINT DF_articleproperty_sort DEFAULT 0,
|
||||
CONSTRAINT FK_articleproperty_article FOREIGN KEY (article_id) REFERENCES article(id) ON DELETE CASCADE,
|
||||
CONSTRAINT FK_articleproperty_property FOREIGN KEY (property_id) REFERENCES propertyname(id) ON DELETE CASCADE
|
||||
CONSTRAINT FK_articleproperty_property FOREIGN KEY (property_id) REFERENCES propertyname(id) ON DELETE NO ACTION
|
||||
);
|
||||
END
|
||||
`;
|
||||
@@ -1072,7 +1072,7 @@ BEGIN
|
||||
attributevalue_id INT NOT NULL,
|
||||
sort INT NOT NULL CONSTRAINT DF_articleattributevalue_sort DEFAULT 0,
|
||||
CONSTRAINT FK_articleattributevalue_article FOREIGN KEY (article_id) REFERENCES article(id) ON DELETE CASCADE,
|
||||
CONSTRAINT FK_articleattributevalue_attributevalue FOREIGN KEY (attributevalue_id) REFERENCES attributevalue(id) ON DELETE CASCADE,
|
||||
CONSTRAINT FK_articleattributevalue_attributevalue FOREIGN KEY (attributevalue_id) REFERENCES attributevalue(id) ON DELETE NO ACTION,
|
||||
CONSTRAINT UQ_articleattributevalue_article_attributevalue UNIQUE (article_id, attributevalue_id)
|
||||
);
|
||||
END
|
||||
@@ -1088,7 +1088,7 @@ BEGIN
|
||||
value NVARCHAR(MAX) NOT NULL,
|
||||
sort INT NOT NULL CONSTRAINT DF_categoryproperty_sort DEFAULT 0,
|
||||
CONSTRAINT FK_categoryproperty_category FOREIGN KEY (category_id) REFERENCES category(id) ON DELETE CASCADE,
|
||||
CONSTRAINT FK_categoryproperty_property FOREIGN KEY (property_id) REFERENCES propertyname(id) ON DELETE CASCADE
|
||||
CONSTRAINT FK_categoryproperty_property FOREIGN KEY (property_id) REFERENCES propertyname(id) ON DELETE NO ACTION
|
||||
);
|
||||
END
|
||||
`;
|
||||
|
||||
@@ -716,7 +716,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
|
||||
FOREIGN KEY (property_id) REFERENCES propertyname(id) ON DELETE NO ACTION
|
||||
);
|
||||
`;
|
||||
|
||||
@@ -750,7 +750,7 @@ CREATE TABLE IF NOT EXISTS articleattributevalue (
|
||||
attributevalue_id INTEGER NOT NULL,
|
||||
sort INTEGER NOT NULL DEFAULT 0,
|
||||
FOREIGN KEY (article_id) REFERENCES article(id) ON DELETE CASCADE,
|
||||
FOREIGN KEY (attributevalue_id) REFERENCES attributevalue(id) ON DELETE CASCADE,
|
||||
FOREIGN KEY (attributevalue_id) REFERENCES attributevalue(id) ON DELETE NO ACTION,
|
||||
UNIQUE (article_id, attributevalue_id)
|
||||
);
|
||||
`;
|
||||
@@ -763,7 +763,7 @@ CREATE TABLE IF NOT EXISTS categoryproperty (
|
||||
value TEXT NOT NULL,
|
||||
sort INTEGER NOT NULL DEFAULT 0,
|
||||
FOREIGN KEY (category_id) REFERENCES category(id) ON DELETE CASCADE,
|
||||
FOREIGN KEY (property_id) REFERENCES propertyname(id) ON DELETE CASCADE
|
||||
FOREIGN KEY (property_id) REFERENCES propertyname(id) ON DELETE NO ACTION
|
||||
);
|
||||
`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user