SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[WEBENGINE_LOTTERY](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[current_jackpot] [int] NOT NULL,
	[current_stage] [tinyint] NOT NULL,
	[start_timestamp] [datetime] NOT NULL,
	[end_timestamp] [datetime] NOT NULL,
	[number1] [tinyint] NOT NULL,
	[number2] [tinyint] NOT NULL,
	[number3] [tinyint] NOT NULL,
	[number4] [tinyint] NOT NULL,
	[winners_1] [int] NULL,
	[winners_2] [int] NULL,
	[winners_3] [int] NULL,
	[winners_4] [int] NULL,
	[finished] [tinyint] NULL,
 CONSTRAINT [PK_WEBENGINE_LOTTERY] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

ALTER TABLE [dbo].[WEBENGINE_LOTTERY] ADD  CONSTRAINT [DF_WEBENGINE_LOTTERY_current_jackpot]  DEFAULT ((0)) FOR [current_jackpot]

ALTER TABLE [dbo].[WEBENGINE_LOTTERY] ADD  CONSTRAINT [DF_WEBENGINE_LOTTERY_current_stage]  DEFAULT ((0)) FOR [current_stage]


