[dbo].[AccountProfileServicesOverride]
This table stores information on account profile services that have been overridden for a particular order
CREATE TABLE [dbo].[AccountProfileServicesOverride]
(
[AccountProfileServiceOverrideID] [int] NOT NULL IDENTITY(1, 1),
[OrderFID] [int] NOT NULL,
[AccountProfileServiceFID] [int] NOT NULL,
[AccountProfileServiceStatusFID] [int] NOT NULL,
[Comment] [varchar] (256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ModifiedBySysUserFID] [int] NOT NULL,
[ModifiedDate] [datetime] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AccountProfileServicesOverride] ADD CONSTRAINT [PK_AccountProfileServicesOverride] PRIMARY KEY NONCLUSTERED ([AccountProfileServiceOverrideID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AccountProfileServicesOverride] ADD CONSTRAINT [ix_AccountProfileServicesOverride_Order_AccountProfileService] UNIQUE NONCLUSTERED ([OrderFID], [AccountProfileServiceFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_AccountProfileServicesOverride_ModifiedBySysUserFID] ON [dbo].[AccountProfileServicesOverride] ([ModifiedBySysUserFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AccountProfileServicesOverride] ADD CONSTRAINT [FK_AccountProfileServicesOverride_AccountProfileServices] FOREIGN KEY ([AccountProfileServiceFID]) REFERENCES [dbo].[AccountProfileServices] ([AccountProfileServiceID])
GO
ALTER TABLE [dbo].[AccountProfileServicesOverride] ADD CONSTRAINT [FK_AccountProfileServicesOverride_AccountProfileServiceStatus] FOREIGN KEY ([AccountProfileServiceStatusFID]) REFERENCES [dbo].[AccountProfileServiceStatus] ([AccountProfileServiceStatusID])
GO
ALTER TABLE [dbo].[AccountProfileServicesOverride] ADD CONSTRAINT [FK_AccountProfileServicesOverride_SysUser] FOREIGN KEY ([ModifiedBySysUserFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[AccountProfileServicesOverride] ADD CONSTRAINT [FK_AccountProfileServicesOverride_Orders] FOREIGN KEY ([OrderFID]) REFERENCES [dbo].[Orders] ([PriKey])
GO
GRANT SELECT ON [dbo].[AccountProfileServicesOverride] TO [MssExec]
GRANT INSERT ON [dbo].[AccountProfileServicesOverride] TO [MssExec]
GRANT DELETE ON [dbo].[AccountProfileServicesOverride] TO [MssExec]
GRANT UPDATE ON [dbo].[AccountProfileServicesOverride] TO [MssExec]
GO
EXEC sp_addextendedproperty N'MS_Description', N'This table stores information on account profile services that have been overridden for a particular order', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileServicesOverride', NULL, NULL
GO
EXEC sp_addextendedproperty N'MS_Description', N'Key linking this table to a particular account profile service', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileServicesOverride', 'COLUMN', N'AccountProfileServiceFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key of this table', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileServicesOverride', 'COLUMN', N'AccountProfileServiceOverrideID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Key linking this table to a particular service status', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileServicesOverride', 'COLUMN', N'AccountProfileServiceStatusFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Comments pertaining to the account profile service override', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileServicesOverride', 'COLUMN', N'Comment'
GO
EXEC sp_addextendedproperty N'MS_Description', N'MoversSuite user that performed the override', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileServicesOverride', 'COLUMN', N'ModifiedBySysUserFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The date that the override was performed', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileServicesOverride', 'COLUMN', N'ModifiedDate'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Key linking this table to a particular order', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileServicesOverride', 'COLUMN', N'OrderFID'
GO