u
This commit is contained in:
@@ -5,8 +5,8 @@ const queries = translateQueries(source, 'numbers');
|
||||
export const { GET_BY_COMPANY_AND_ID, LIST_BY_COMPANY, UPDATE_BY_COMPANY_AND_ID } = queries;
|
||||
|
||||
export const ENSURE_TYPE = `
|
||||
INSERT INTO numbers (company_id, "type")
|
||||
VALUES (@companyId, @type)
|
||||
INSERT INTO numbers (company_id, "type", prefix)
|
||||
VALUES (@companyId, @type, COALESCE(@prefix, ''))
|
||||
ON CONFLICT (company_id, "type") DO NOTHING
|
||||
`;
|
||||
|
||||
|
||||
15
src/providers/sqlite3/queries/shipment.js
Normal file
15
src/providers/sqlite3/queries/shipment.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import * as source from '../../mssql/queries/shipment.js';
|
||||
import { translateQueries } from './translate.js';
|
||||
|
||||
const queries = translateQueries(source, 'shipment');
|
||||
export const {
|
||||
SHIPMENT_TYPE,
|
||||
GET_ORDER_HEADER,
|
||||
GET_ORDER_LINES,
|
||||
GET_SHIPMENT_PREFIX,
|
||||
LIST_SHIPMENTS_BY_ORDER_NUMBER_PATTERN,
|
||||
GET_SHIPPED_AMOUNTS_BY_ORDER_PATTERN,
|
||||
GET_SHIPMENT_HEADER,
|
||||
CHECK_SHIPMENT_PACKAGES_SHIPPED,
|
||||
DELETE_SHIPMENT,
|
||||
} = queries;
|
||||
@@ -823,6 +823,8 @@ CREATE TABLE IF NOT EXISTS shipping (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
manifest_id INTEGER NOT NULL,
|
||||
"number" TEXT NOT NULL,
|
||||
tracking_code TEXT NULL,
|
||||
carrier TEXT NULL,
|
||||
"type" TEXT NOT NULL,
|
||||
"state" TEXT NOT NULL,
|
||||
FOREIGN KEY (manifest_id) REFERENCES manifest(id) ON DELETE CASCADE
|
||||
|
||||
Reference in New Issue
Block a user