Add company-scoped delivery store on manifest
This commit is contained in:
@@ -468,10 +468,12 @@ IF NOT EXISTS (SELECT * FROM sys.tables WHERE name = 'manifest')
|
||||
BEGIN
|
||||
CREATE TABLE manifest (
|
||||
id INT IDENTITY(1,1) PRIMARY KEY,
|
||||
company_id INT NOT NULL,
|
||||
[number] NVARCHAR(100) NOT NULL,
|
||||
[type] NVARCHAR(100) NOT NULL,
|
||||
entity_id INT NULL,
|
||||
[date] DATETIME2 NOT NULL CONSTRAINT DF_manifest_date DEFAULT SYSUTCDATETIME(),
|
||||
CONSTRAINT FK_manifest_company FOREIGN KEY (company_id) REFERENCES company(id) ON DELETE NO ACTION,
|
||||
CONSTRAINT FK_manifest_entity FOREIGN KEY (entity_id) REFERENCES entity(id) ON DELETE SET NULL
|
||||
);
|
||||
END
|
||||
|
||||
Reference in New Issue
Block a user