u
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user