SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[coupons]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[coupons](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[time] [datetime] NULL,
	[endtime] [datetime] NULL,
	[enable] [bit] NOT NULL,
	[uid] [int] NULL,
	[title] [nvarchar](255) NULL,
	[thumbnail] [nvarchar](255) NULL,
	[istop] [bit] NOT NULL,
	[isred] [bit] NOT NULL,
	[content] [nvarchar](max) NULL,
	[click] [int] NULL,
	[ip] [nvarchar](255) NULL
) ON [PRIMARY]
END