IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='CSAPP_LICENSING')
CREATE TABLE [dbo].[CSAPP_LICENSING](
[PK] [int] PRIMARY KEY IDENTITY(1,1) NOT NULL,
[code] [varchar](255) NOT NULL,
[active] [bit] NOT NULL,
[last_action] [int] NOT NULL,
[app_name] [varchar](255) NOT NULL
)

IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='CSAPP_LICENSING_ACTIONS')
CREATE TABLE [dbo].[CSAPP_LICENSING_ACTIONS](
[PK] [int] PRIMARY KEY IDENTITY(1,1) NOT NULL,
[activated] [bit] NOT NULL,
[checked] [bit] NULL,
[date] [datetime] NOT NULL,
[license] integer NULL
)
