IF NOT EXISTS
(
    SELECT *
    FROM sysobjects
    WHERE name = 'RKaraNotifyPermission'
)
BEGIN

    CREATE TABLE [dbo].[RKaraNotifyPermission]
    (
        [UserId] [SMALLINT] NOT NULL,
        [NotifyType] [TINYINT] NOT NULL,
        CONSTRAINT [PK_RKaraNotifyPermission]
            PRIMARY KEY CLUSTERED (
                                      [UserId] ASC,
                                      [NotifyType] ASC
                                  ) ON [PRIMARY]
    );
END;
