[ Index ] |
|
Code source de Horde 3.1.3 |
1 -- $Horde: horde/scripts/sql/create.pgsql.sql,v 1.1.10.5 2006/08/04 20:49:43 jan Exp $ 2 -- 3 -- Uncomment the ALTER line below, and change the password. Then run as: 4 -- 5 -- $ psql -d template1 -f create.pgsql.sql 6 7 CREATE DATABASE horde; 8 9 \c horde; 10 11 CREATE USER horde; 12 13 -- ALTER USER horde WITH PASSWORD 'pass'; 14 15 16 CREATE TABLE horde_users ( 17 user_uid VARCHAR(255) NOT NULL, 18 user_pass VARCHAR(255) NOT NULL, 19 user_soft_expiration_date INTEGER, 20 user_hard_expiration_date INTEGER, 21 -- 22 PRIMARY KEY (user_uid) 23 ); 24 25 GRANT SELECT, INSERT, UPDATE, DELETE ON horde_users TO horde; 26 27 28 CREATE TABLE horde_prefs ( 29 pref_uid VARCHAR(255) NOT NULL, 30 pref_scope VARCHAR(16) DEFAULT '' NOT NULL, 31 pref_name VARCHAR(32) NOT NULL, 32 pref_value TEXT, 33 -- 34 PRIMARY KEY (pref_uid, pref_scope, pref_name) 35 ); 36 37 CREATE INDEX pref_uid_idx ON horde_prefs (pref_uid); 38 CREATE INDEX pref_scope_idx ON horde_prefs (pref_scope); 39 40 GRANT SELECT, INSERT, UPDATE, DELETE ON horde_prefs TO horde; 41 42 43 CREATE TABLE horde_datatree ( 44 datatree_id INT NOT NULL, 45 group_uid VARCHAR(255) NOT NULL, 46 user_uid VARCHAR(255) NOT NULL, 47 datatree_name VARCHAR(255) NOT NULL, 48 datatree_parents VARCHAR(255) NOT NULL, 49 datatree_order INT, 50 datatree_data TEXT, 51 datatree_serialized SMALLINT DEFAULT 0 NOT NULL, 52 53 PRIMARY KEY (datatree_id) 54 ); 55 56 CREATE INDEX datatree_datatree_name_idx ON horde_datatree (datatree_name); 57 CREATE INDEX datatree_group_idx ON horde_datatree (group_uid); 58 CREATE INDEX datatree_user_idx ON horde_datatree (user_uid); 59 CREATE INDEX datatree_order_idx ON horde_datatree (datatree_order); 60 CREATE INDEX datatree_serialized_idx ON horde_datatree (datatree_serialized); 61 62 63 CREATE TABLE horde_datatree_attributes ( 64 datatree_id INT NOT NULL, 65 attribute_name VARCHAR(255) NOT NULL, 66 attribute_key VARCHAR(255), 67 attribute_value TEXT 68 ); 69 70 CREATE INDEX datatree_attribute_idx ON horde_datatree_attributes (datatree_id); 71 CREATE INDEX datatree_attribute_name_idx ON horde_datatree_attributes (attribute_name); 72 CREATE INDEX datatree_attribute_key_idx ON horde_datatree_attributes (attribute_key); 73 74 GRANT SELECT, INSERT, UPDATE, DELETE ON horde_datatree TO horde; 75 GRANT SELECT, INSERT, UPDATE, DELETE ON horde_datatree_attributes TO horde; 76 77 78 CREATE TABLE horde_tokens ( 79 token_address VARCHAR(100) NOT NULL, 80 token_id VARCHAR(32) NOT NULL, 81 token_timestamp BIGINT NOT NULL, 82 -- 83 PRIMARY KEY (token_address, token_id) 84 ); 85 86 GRANT SELECT, INSERT, UPDATE, DELETE ON horde_tokens TO horde; 87 88 89 CREATE TABLE horde_vfs ( 90 vfs_id BIGINT NOT NULL, 91 vfs_type SMALLINT NOT NULL, 92 vfs_path VARCHAR(255) NOT NULL, 93 vfs_name VARCHAR(255) NOT NULL, 94 vfs_modified BIGINT NOT NULL, 95 vfs_owner VARCHAR(255) NOT NULL, 96 vfs_data TEXT, 97 98 PRIMARY KEY (vfs_id) 99 ); 100 101 CREATE INDEX vfs_path_idx ON horde_vfs (vfs_path); 102 CREATE INDEX vfs_name_idx ON horde_vfs (vfs_name); 103 104 GRANT SELECT, INSERT, UPDATE, DELETE ON horde_vfs TO horde; 105 106 107 CREATE TABLE horde_sessionhandler ( 108 session_id VARCHAR(32) NOT NULL, 109 session_lastmodified INT NOT NULL, 110 session_data TEXT, 111 PRIMARY KEY (session_id) 112 ); 113 114 GRANT SELECT, INSERT, UPDATE, DELETE ON horde_sessionhandler TO horde; 115 116 117 CREATE TABLE horde_histories ( 118 history_id BIGINT NOT NULL, 119 object_uid VARCHAR(255) NOT NULL, 120 history_action VARCHAR(32) NOT NULL, 121 history_ts BIGINT NOT NULL, 122 history_desc TEXT, 123 history_who VARCHAR(255), 124 history_extra TEXT, 125 -- 126 PRIMARY KEY (history_id) 127 ); 128 129 CREATE INDEX history_action_idx ON horde_histories (history_action); 130 CREATE INDEX history_ts_idx ON horde_histories (history_ts); 131 CREATE INDEX history_uid_idx ON horde_histories (object_uid); 132 133 GRANT SELECT, INSERT, UPDATE, DELETE ON horde_histories TO horde;
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 |