u
This commit is contained in:
5
src/providers/sqlite3/queries/attributevaluepic.js
Normal file
5
src/providers/sqlite3/queries/attributevaluepic.js
Normal file
@@ -0,0 +1,5 @@
|
||||
import * as source from '../../mssql/queries/attributevaluepic.js';
|
||||
import { translateQueries } from './translate.js';
|
||||
|
||||
const queries = translateQueries(source, 'attributevaluepic');
|
||||
export const { ADD, DELETE_BY_ATTRIBUTE_VALUE, GET_FIRST_PIC_BY_ATTRIBUTE_VALUE, GET_NEXT_SORT } = queries;
|
||||
@@ -284,6 +284,19 @@ CREATE TABLE IF NOT EXISTS brandpic (
|
||||
);
|
||||
`;
|
||||
|
||||
export const INIT_ATTRIBUTEVALUEPIC = `
|
||||
CREATE TABLE IF NOT EXISTS attributevaluepic (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
attributevalue_id INTEGER NOT NULL,
|
||||
pic_id INTEGER NOT NULL,
|
||||
sort INTEGER NOT NULL DEFAULT 0,
|
||||
UNIQUE (attributevalue_id, pic_id),
|
||||
UNIQUE (attributevalue_id, sort),
|
||||
FOREIGN KEY (attributevalue_id) REFERENCES attributevalue(id) ON DELETE CASCADE,
|
||||
FOREIGN KEY (pic_id) REFERENCES pic(id) ON DELETE CASCADE
|
||||
);
|
||||
`;
|
||||
|
||||
export const INIT_ARTICLELISTARTICLE = `
|
||||
CREATE TABLE IF NOT EXISTS articlelistarticle (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
@@ -853,6 +866,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