PageRenderTime 19ms CodeModel.GetById 12ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 0ms

/PetaPoco.Tests/sqlserver_init.sql

http://github.com/toptensoftware/PetaPoco
SQL | 26 lines | 21 code | 5 blank | 0 comment | 0 complexity | 674a61fdf2ceac2e27e39ac9dbac3201 MD5 | raw file
 1IF OBJECT_ID('dbo.petapoco','U') IS NOT NULL
 2	DROP TABLE dbo.petapoco;
 3
 4CREATE TABLE petapoco (
 5
 6	id				bigint IDENTITY(1,1) NOT NULL,
 7	title			varchar(127) NOT NULL,
 8	draft			bit NOT NULL,
 9	date_created	datetime NOT NULL,
10	date_edited		datetime NULL,
11	content			VARCHAR(MAX) NOT NULL,
12	state			int NOT NULL,
13	[col w space]	int,
14	nullreal		real NULL,
15	
16	PRIMARY KEY (id)
17);
18
19IF OBJECT_ID('dbo.petapoco2','U') IS NOT NULL
20	DROP TABLE dbo.petapoco2;
21
22CREATE TABLE petapoco2 (
23	email		varchar(127) NOT NULL,
24	name		varchar(127) NOT NULL,
25	PRIMARY KEY (email)
26);