[dbo].[AccountProfilePresetPhoneNumber]
CREATE TABLE [dbo].[AccountProfilePresetPhoneNumber]
(
[AccountProfilePresetPhoneNumberID] [int] NOT NULL IDENTITY(1, 1),
[AccountProfilePresetFID] [int] NOT NULL,
[CountryCodeStandardFID] [int] NULL,
[AreaCode] [dbo].[PhoneAreaCode] NULL,
[LocalNumber] [dbo].[PhoneLocalNumber] NULL,
[Extension] [dbo].[PhoneExtension] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AccountProfilePresetPhoneNumber] ADD CONSTRAINT [PK_AccountProfilePresetPhoneNumber] PRIMARY KEY NONCLUSTERED ([AccountProfilePresetPhoneNumberID]) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_AccountProfilePresetPhoneNumber_AccountProfilePresetFID] ON [dbo].[AccountProfilePresetPhoneNumber] ([AccountProfilePresetFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AccountProfilePresetPhoneNumber] ADD CONSTRAINT [FK_AccountProfilePresetPhoneNumber_AccountProfilePreset] FOREIGN KEY ([AccountProfilePresetFID]) REFERENCES [dbo].[AccountProfilePreset] ([AccountProfilePresetID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[AccountProfilePresetPhoneNumber] ADD CONSTRAINT [FK_AccountProfilePresetPhoneNumber_CountryCodeStandard] FOREIGN KEY ([CountryCodeStandardFID]) REFERENCES [dbo].[CountryCodeStandard] ([CountryCodeStandardID])
GO
GRANT SELECT ON [dbo].[AccountProfilePresetPhoneNumber] TO [MssExec]
GRANT INSERT ON [dbo].[AccountProfilePresetPhoneNumber] TO [MssExec]
GRANT DELETE ON [dbo].[AccountProfilePresetPhoneNumber] TO [MssExec]
GRANT UPDATE ON [dbo].[AccountProfilePresetPhoneNumber] TO [MssExec]
GO