u
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
export const CREATE = `
|
||||
INSERT INTO pic (
|
||||
w, h, size, hash, thumbw, thumbh, thumbhash, source, fullbinary, thumbbinary
|
||||
w, h, size, hash, thumbw, thumbh, thumbhash,
|
||||
smallthumbw, smallthumbh, smallthumbbinary,
|
||||
source, fullbinary, thumbbinary
|
||||
)
|
||||
OUTPUT INSERTED.id
|
||||
VALUES (
|
||||
@w, @h, @size, @hash, @thumbw, @thumbh, @thumbhash, @source, @fullbinary, @thumbbinary
|
||||
@w, @h, @size, @hash, @thumbw, @thumbh, @thumbhash,
|
||||
@smallthumbw, @smallthumbh, @smallthumbbinary,
|
||||
@source, @fullbinary, @thumbbinary
|
||||
)
|
||||
`;
|
||||
|
||||
|
||||
@@ -95,9 +95,12 @@ BEGIN
|
||||
thumbw INT NOT NULL,
|
||||
thumbh INT NOT NULL,
|
||||
thumbhash NVARCHAR(64) NOT NULL,
|
||||
smallthumbw INT NOT NULL,
|
||||
smallthumbh INT NOT NULL,
|
||||
source NVARCHAR(MAX) NOT NULL,
|
||||
fullbinary VARBINARY(MAX) NOT NULL,
|
||||
thumbbinary VARBINARY(MAX) NOT NULL,
|
||||
smallthumbbinary VARBINARY(MAX) NOT NULL,
|
||||
CONSTRAINT UQ_pic_hash UNIQUE (hash)
|
||||
);
|
||||
END
|
||||
@@ -1220,4 +1223,3 @@ export const SCHEMA_SCRIPTS = [
|
||||
INIT_SHIPPING,
|
||||
INIT_PACKAGE,
|
||||
];
|
||||
|
||||
|
||||
@@ -8,10 +8,12 @@ export const {
|
||||
|
||||
export const CREATE = `
|
||||
INSERT INTO pic (
|
||||
w, h, size, hash, thumbw, thumbh, thumbhash, source
|
||||
w, h, size, hash, thumbw, thumbh, thumbhash,
|
||||
smallthumbw, smallthumbh, smallthumbbinary, source
|
||||
)
|
||||
VALUES (
|
||||
@w, @h, @size, @hash, @thumbw, @thumbh, @thumbhash, @source
|
||||
@w, @h, @size, @hash, @thumbw, @thumbh, @thumbhash,
|
||||
@smallthumbw, @smallthumbh, @smallthumbbinary, @source
|
||||
)
|
||||
RETURNING id
|
||||
`;
|
||||
|
||||
@@ -43,6 +43,9 @@ CREATE TABLE IF NOT EXISTS pic (
|
||||
thumbw INTEGER NOT NULL,
|
||||
thumbh INTEGER NOT NULL,
|
||||
thumbhash TEXT NOT NULL,
|
||||
smallthumbw INTEGER NOT NULL,
|
||||
smallthumbh INTEGER NOT NULL,
|
||||
smallthumbbinary BLOB NOT NULL,
|
||||
source TEXT NOT NULL
|
||||
);
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user