IF NOT EXISTS (select * from sys.tables where name='Settings')
BEGIN
    create table [dbo].[Settings] (
        [Id] int IDENTITY(1,1) not null,
        [Key] varchar(128) not null,        
		[Value] nvarchar(MAX) null,                        
        [Date] datetimeoffset not null)

    CREATE INDEX [SETTINGS_KEY]
    ON [dbo].[Settings]
        ([Key])                      
END