Ticket #291: sqlserver.sql

File sqlserver.sql, 2.3 kB (added by ryan, 19 years ago)

SQl Server Create script

Line 
1/* make sure you change the table name from "pages" to add the prefix you specified in CanvasConfig.xml */
2
3if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pages]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
4drop table [dbo].[pages]
5GO
6
7CREATE TABLE [dbo].[pages] (
8        [id] [nvarchar] (35) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
9        [path] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
10        [body] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
11        [datetimecreated] [datetime] NOT NULL ,
12        [author] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
13        [version] [int] NOT NULL ,
14        [summary] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, 
15        [categories] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
16        [authrolestoview] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
17        [authrolestoedit] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, 
18        [filename] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
19        [filesize] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
20        [filemimetype] [nvarchar] (45) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
21        [imagewidth] [int] NULL ,
22        [imageheight] [int] NULL,
23        [author] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL     
24) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
25GO
26
27insert into pages(id, path, body, datetimecreated, author, version, summary, categories) values('EE04D302-00F3-1F8D-A3CDC239FC957A6A', 'Main', 'Welcome to CanvasWiki. To begin editing content, simply click on the [b]edit this page[/b] link on the right.[[Category:General]]', '2005-10-12', 'Raymond Camden', '1', 'Initial', 'General')
28insert into pages(id, path, body, datetimecreated, author, version, summary, categories) values('EE04D302-00F3-1F8D-A3CDC239FC957A6B', 'Special.Templates.NoContentYet', '<div class="wiki_nocontentyet"><p>This page does not exist yet. To create the content, <a href="{editlink}">Edit this Page</a>.</p></div>', '2005-10-12', 'Raymond Camden', '1', 'Initial', '')
29insert into pages(id, path, body, datetimecreated, author, version, summary, categories) values('EE04D302-00F3-1F8D-A3CDC239FC957A6C', 'Special.Templates.Stub', '<div class="wiki_stub"><p>This article is a stub, awaiting your knowledge. Please <a href="{editlink}">edit</a> and enhance.</p></div>', '2005-10-12', 'Raymond Camden', '1', 'Initial', '')