CREATE TABLE [dbo].[pol_acts]
(
[pact_act_code] [dbo].[ais_code_short] NOT NULL,
[pact_l1] [nvarchar] (64) COLLATE French_CI_AS NOT NULL,
[pact_l2] [nvarchar] (64) COLLATE French_CI_AS NULL,
[pact_l3] [nvarchar] (64) COLLATE French_CI_AS NULL,
[pact_sys] [bit] NOT NULL CONSTRAINT [DF__pol_acts__pact_sys] DEFAULT ((0)),
[pact_movement_code] [dbo].[ais_code_short] NULL
) ON [PRIMARY]
ALTER TABLE [dbo].[pol_acts] ADD
CONSTRAINT [CK__pol_acts_pact_act_code__string_pk] CHECK ((len(ltrim(rtrim([pact_act_code])))>(0) AND charindex('*',[pact_act_code])=(0) AND charindex('%',[pact_act_code])=(0)))
ALTER TABLE [dbo].[pol_acts] ADD 
CONSTRAINT [PK_pol_acts] PRIMARY KEY CLUSTERED  ([pact_act_code]) ON [PRIMARY]
GO

ALTER TABLE [dbo].[pol_acts] ADD CONSTRAINT [FK_pol_acts_pol_mvts] FOREIGN KEY ([pact_movement_code]) REFERENCES [dbo].[pol_mvts] ([pmvt_mvt_code])
GO
