[dbo].[InternationalPort]
CREATE TABLE [dbo].[InternationalPort]
(
[InternationalPortID] [int] NOT NULL IDENTITY(1, 1),
[InternationalTransportationTypeFID] [int] NOT NULL,
[PortCode] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Name] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CountryCodeStandardFID] [int] NULL,
[Inactive] [bit] NOT NULL CONSTRAINT [DF_InternationalPort_Inactive] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalPort] ADD CONSTRAINT [PK_InternationalPort] PRIMARY KEY NONCLUSTERED ([InternationalPortID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalPort] ADD CONSTRAINT [IX_InternationalPort_PortCode_InternationalTransportationTypeFID] UNIQUE NONCLUSTERED ([PortCode], [InternationalTransportationTypeFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_InternationalPort_Name] ON [dbo].[InternationalPort] ([Name]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalPort] ADD CONSTRAINT [FK_InternationalPort_CountryCodeStandard] FOREIGN KEY ([CountryCodeStandardFID]) REFERENCES [dbo].[CountryCodeStandard] ([CountryCodeStandardID])
GO
ALTER TABLE [dbo].[InternationalPort] ADD CONSTRAINT [FK_InternationalPort_InternationalTransportationType] FOREIGN KEY ([InternationalTransportationTypeFID]) REFERENCES [dbo].[InternationalTransportationType] ([InternationalTransportationTypeID])
GO
GRANT SELECT ON [dbo].[InternationalPort] TO [MssExec]
GRANT INSERT ON [dbo].[InternationalPort] TO [MssExec]
GRANT DELETE ON [dbo].[InternationalPort] TO [MssExec]
GRANT UPDATE ON [dbo].[InternationalPort] TO [MssExec]
GO