[horde] MSDE SQL Create Script

Jeff Graves jeff at image-src.com
Mon Apr 25 15:09:00 PDT 2005


Damn MailScanner config....just in case it blocks it anywhere else:

USE master
GO

CREATE DATABASE horde
GO

EXEC sp_addlogin 'horde', 'horde_mgr', 'horde'
GO

USE horde
GO

EXEC sp_grantdbaccess 'horde'
GO

CREATE TABLE horde_users (
user_uid varchar(255) NOT NULL,
user_pass varchar(255) NOT NULL,

PRIMARY KEY (user_uid)
)
GO

GRANT SELECT, INSERT, UPDATE, DELETE ON horde_users To horde
GO

CREATE TABLE horde_prefs (
pref_uid varchar(200) NOT NULL,
pref_scope varchar(16) NOT NULL DEFAULT '',
pref_name varchar(32) NOT NULL,
pref_value text NULL,

PRIMARY KEY (pref_uid, pref_scope, pref_name)
)
GO

GRANT SELECT, INSERT, UPDATE, DELETE ON horde_prefs TO horde
GO

CREATE TABLE horde_datatree (
datatree_id int NOT NULL,
group_uid varchar(255) NOT NULL,
user_uid varchar(255) NOT NULL,
datatree_name varchar(255) NOT NULL,
datatree_parents varchar(255) NOT NULL,
datatree_order int,
datatree_data text,
datatree_serialized smallint DEFAULT 0 NOT NULL,
datatree_updated timestamp,

PRIMARY KEY (datatree_id)
)
GO

GRANT SELECT, INSERT, UPDATE, DELETE ON horde_datatree TO horde
GO

CREATE INDEX datatree_datatree_name_idx ON horde_datatree (datatree_name)
CREATE INDEX datatree_group_idx ON horde_datatree (group_uid)
CREATE INDEX datatree_user_idx ON horde_datatree (user_uid)
CREATE INDEX datatree_serialized_idx ON horde_datatree (datatree_serialized)
GO

CREATE TABLE horde_datatree_attributes (
datatree_id int NOT NULL,
attribute_name varchar(255) NOT NULL,
attribute_key varchar(255) DEFAULT '' NOT NULL,
attribute_value text
)
GO

GRANT SELECT, INSERT, UPDATE, DELETE ON horde_datatree TO horde
GO

CREATE INDEX datatree_attribute_idx ON horde_datatree_attributes
(datatree_id)
CREATE INDEX datatree_attribute_name_idx ON horde_datatree_attributes
(attribute_name)
CREATE INDEX datatree_attribute_key_idx ON horde_datatree_attributes
(attribute_key)
GO

CREATE TABLE horde_tokens (
token_address varchar(100) NOT NULL,
token_id varchar(32) NOT NULL,
token_timestamp bigint NOT NULL,

PRIMARY KEY (token_address, token_id)
)
GO

GRANT SELECT, INSERT, UPDATE, DELETE ON horde_tokens TO horde
GO

CREATE TABLE horde_vfs (
vfs_id bigint NOT NULL,
vfs_type smallint NOT NULL,
vfs_path varchar(255) NOT NULL,
vfs_name varchar(255) NOT NULL,
vfs_modified bigint NOT NULL,
vfs_owner varchar(255) NOT NULL,
vfs_data text,

PRIMARY KEY   (vfs_id)
)
GO

GRANT SELECT, INSERT, UPDATE, DELETE ON horde_vfs TO horde
GO

CREATE INDEX vfs_path_idx ON horde_vfs (vfs_path)
CREATE INDEX vfs_name_idx ON horde_vfs (vfs_name)
GO




Jeff Graves, MCSA
Customer Support Engineer
Image Source, Inc.
10 Mill Street
Bellingham, MA 02019

508.966.5200 - Phone
508.966.5170 - Fax
jeff at image-src.com - Email
www.image-src.com

-----Original Message-----
From: Jeff Graves 
Sent: Monday, April 25, 2005 6:04 PM
To: horde at lists.horde.org
Subject: MSDE SQL Create Script


I'd like to submit the following SQL script for MSDE. I'm putting together a
Win32 tutorial (like Mike Cochrane had) for IIS, MSDE, PHP, and Horde. I'm
hoping to put together an entire installer package but that's down the
road...

Jeff Graves, MCSA
Customer Support Engineer
Image Source, Inc.
10 Mill Street
Bellingham, MA 02019

508.966.5200 - Phone
508.966.5170 - Fax
jeff at image-src.com - Email
www.image-src.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: create.msde.sql
Type: application/octet-stream
Size: 2452 bytes
Desc: not available
Url : http://lists.horde.org/pipermail/horde/attachments/20050425/e4ee3ebd/create.msde.obj


More information about the horde mailing list