[dbo].[LocalServiceLaborRequest]
CREATE TABLE [dbo].[LocalServiceLaborRequest]
(
[LocalServiceLaborRequestID] [int] NOT NULL IDENTITY(1, 1),
[LocalServiceFID] [int] NOT NULL,
[LaborTypeFID] [int] NOT NULL,
[Quantity] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[LocalServiceLaborRequest] ADD CONSTRAINT [PK_LocalServiceLaborRequest] PRIMARY KEY CLUSTERED ([LocalServiceLaborRequestID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[LocalServiceLaborRequest] ADD CONSTRAINT [IX_LocalServiceLaborRequest_LocalServiceFID_LaborTypeFID] UNIQUE NONCLUSTERED ([LocalServiceFID], [LaborTypeFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[LocalServiceLaborRequest] ADD CONSTRAINT [FK_LocalServiceLaborRequest_LaborTypeFID] FOREIGN KEY ([LaborTypeFID]) REFERENCES [dbo].[LaborType] ([PriKey])
GO
ALTER TABLE [dbo].[LocalServiceLaborRequest] ADD CONSTRAINT [FK_LocalServiceLaborRequest_LocalServiceFID] FOREIGN KEY ([LocalServiceFID]) REFERENCES [dbo].[LocServ] ([PriKey]) ON DELETE CASCADE
GO
GRANT SELECT ON [dbo].[LocalServiceLaborRequest] TO [MssExec]
GRANT INSERT ON [dbo].[LocalServiceLaborRequest] TO [MssExec]
GRANT DELETE ON [dbo].[LocalServiceLaborRequest] TO [MssExec]
GRANT UPDATE ON [dbo].[LocalServiceLaborRequest] TO [MssExec]
GO