[ Index ] |
|
Code source de Horde 3.1.3 |
1 -- $Horde: horde/scripts/sql/create.sybase.sql,v 1.1.10.5 2006/06/29 16:29:03 jan Exp $ 2 -- 3 -- horde tables definitions : sql script 4 -- 01/22/2003 - F. Helly <francois.helly@wanadoo.fr> 5 -- command line syntax : isql -ihorde_sybase.sql 6 -- warning : use nvarchar only if you need unicode encoding for some strings 7 8 use horde 9 go 10 11 12 DROP TABLE horde_datatree 13 go 14 15 DROP TABLE horde_prefs 16 go 17 18 DROP TABLE horde_users 19 go 20 21 DROP TABLE horde_sessionhandler 22 go 23 24 -- DROP TABLE horde_datatree_seq 25 -- go 26 27 -- DROP TABLE horde_tokens 28 -- go 29 30 -- DROP TABLE horde_vfs 31 -- go 32 33 -- DROP TABLE horde_muvfs 34 -- go 35 36 37 CREATE TABLE horde_users ( 38 user_uid varchar(256) NOT NULL, 39 user_pass varchar(256) NOT NULL, 40 user_soft_expiration_date numeric(10,0), 41 user_hard_expiration_date numeric(10,0), 42 PRIMARY KEY (user_uid) 43 ) 44 go 45 46 CREATE TABLE horde_datatree ( 47 datatree_id numeric(11,0) IDENTITY NOT NULL, 48 group_uid varchar(256) NOT NULL, 49 user_uid varchar(256) NOT NULL, 50 datatree_name varchar(256) NOT NULL, 51 datatree_parents varchar(256) NULL, 52 datatree_data text NULL, 53 datatree_serialized smallint DEFAULT 0 NOT NULL, 54 PRIMARY KEY (datatree_id), 55 FOREIGN KEY (user_uid) 56 REFERENCES horde_users(user_uid) 57 ) 58 go 59 60 CREATE TABLE horde_prefs ( 61 pref_uid varchar(256) NOT NULL, 62 pref_scope varchar(16) NOT NULL, 63 pref_name varchar(32) NOT NULL, 64 pref_value text NULL, 65 PRIMARY KEY (pref_uid,pref_scope,pref_name) 66 ) 67 go 68 69 CREATE TABLE horde_sessionhandler ( 70 session_id varchar(32) NOT NULL, 71 session_lastmodified numeric(11,0) NOT NULL, 72 session_data image NULL, 73 PRIMARY KEY (session_id) 74 ) 75 go 76 77 78 -- CREATE TABLE horde_datatree_seq ( 79 -- id numeric(10,0) IDENTITY NOT NULL, 80 -- PRIMARY KEY (id) 81 -- ) 82 -- go 83 84 -- CREATE TABLE horde_tokens ( 85 -- token_address varchar(100) NOT NULL, 86 -- token_id varchar(32) NOT NULL, 87 -- token_timestamp numeric(20,0) NOT NULL, 88 -- PRIMARY KEY (token_address,token_id) 89 -- ) 90 -- go 91 92 -- CREATE TABLE horde_vfs ( 93 -- vfs_id numeric(20,0) NOT NULL, 94 -- vfs_type numeric(8,0) NOT NULL, 95 -- vfs_path varchar(256) NOT NULL, 96 -- vfs_name nvarchar(256) NOT NULL, 97 -- vfs_modified numeric(20,0) NOT NULL, 98 -- vfs_owner varchar(256) NOT NULL, 99 -- vfs_data image NULL, 100 -- PRIMARY KEY (vfs_id) 101 -- ) 102 -- go 103 104 -- CREATE TABLE horde_muvfs ( 105 -- vfs_id numeric(20,0) NOT NULL, 106 -- vfs_type numeric(8,0) NOT NULL, 107 -- vfs_path varchar(256) NOT NULL, 108 -- vfs_name varchar(256) NOT NULL, 109 -- vfs_modified numeric(8,0) NOT NULL, 110 -- vfs_owner varchar(256) NOT NULL, 111 -- vfs_perms smallint NOT NULL, 112 -- vfs_data image NULL, 113 -- PRIMARY KEY (vfs_id) 114 -- ) 115 -- go 116 117 118 CREATE INDEX pref_uid_idx ON horde_prefs (pref_uid) 119 go 120 121 CREATE INDEX pref_scope_idx ON horde_prefs (pref_scope) 122 go 123 124 CREATE INDEX datatree_datatree_name_idx ON horde_datatree (datatree_name) 125 go 126 127 CREATE INDEX datatree_group_idx ON horde_datatree (group_uid) 128 go 129 130 CREATE INDEX datatree_user_idx ON horde_datatree (user_uid) 131 go 132 133 CREATE INDEX datatree_serialized_idx ON horde_datatree (datatree_serialized) 134 go 135 136 -- CREATE INDEX vfs_path_idx ON horde_vfs (vfs_path) 137 -- go 138 139 -- CREATE INDEX vfs_name_idx ON horde_vfs (vfs_name) 140 -- go 141 142 -- CREATE INDEX vfs_path_idx ON horde_muvfs (vfs_path) 143 -- go 144 145 -- CREATE INDEX vfs_name_idx ON horde_muvfs (vfs_name) 146 -- go 147 148 149 grant select, insert, delete, update on editor to horde 150 go 151 grant select, insert, delete, update on host to horde 152 go 153 grant select, insert, delete, update on dbase to horde 154 go 155 grant select, insert, delete, update on site to horde 156 go 157 grant select, insert, delete, update on connection to horde 158 go 159 grant select, insert, delete, update on horde_datatree to horde 160 go 161 grant select, insert, delete, update on horde_prefs to horde 162 go 163 grant select, insert, delete, update on horde_sessionhandler to horde 164 go 165 166 -- grant select, insert, delete, update on horde_datatree_seq to horde 167 -- go 168 -- grant select, insert, delete, update on horde_tokens to horde 169 -- go 170 -- grant select, insert, delete, update on horde_vfs to horde 171 -- go 172 -- grant select, insert, delete, update on horde_muvfs to horde 173 -- go 174 175 176 177 -- add you admin_user_uid and admin_user_pass 178 179 -- insert into horde_users values ('your_admin_user_uid', 'your_admin_user_pass_md5_encrypted') 180 -- go
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 18:01:28 2007 | par Balluche grâce à PHPXref 0.7 |