-- noinspection SqlNoDataSourceInspectionForFile

-- Schema: tblservice
-- Brief: Used by the Table Service Manager
-- Created by: amerolli
-- Table schema_version: must be defined for database update through the Persistence Component


CREATE TEMPORARY TABLE TSMemory (
		MemKey		VARCHAR,
		MemValue	VARCHAR,
		PRIMARY KEY (MemKey)
);

---
--- Temporary table used for SPLICE_SERVICE API
---
CREATE TEMPORARY TABLE SlicedService (
    ServiceId           INTEGER NOT NULL,      -- The service identification result of the slice
    OrderId             INTEGER NOT NULL,      -- Original OrderId
    LineNumber          INTEGER NOT NULL,      -- The original line number
    SliceLineNumber     INTEGER,               -- The new order line
    CONSTRAINT PK_SlicedService PRIMARY KEY (ServiceId, OrderId, LineNumber)
);
