[ Index ]
 

Code source de Horde 3.1.3

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/scripts/sql/ -> create.msde.sql (source)

   1  -- $Horde: horde/scripts/sql/create.msde.sql,v 1.1.2.5 2006/06/29 16:29:02 jan Exp $
   2  
   3  USE master
   4  GO
   5  
   6  CREATE DATABASE horde
   7  GO
   8  
   9  EXEC sp_addlogin 'horde', 'horde_mgr', 'horde'
  10  GO
  11  
  12  USE horde
  13  GO
  14  
  15  EXEC sp_grantdbaccess 'horde'
  16  GO
  17  
  18  CREATE TABLE horde_users (
  19      user_uid VARCHAR(255) NOT NULL,
  20      user_pass VARCHAR(255) NOT NULL,
  21  
  22      PRIMARY KEY (user_uid)
  23  )
  24  GO
  25  
  26  GRANT SELECT, INSERT, UPDATE, DELETE ON horde_users TO horde
  27  GO
  28  
  29  CREATE TABLE horde_prefs (
  30      pref_uid VARCHAR(200) NOT NULL,
  31      pref_scope VARCHAR(16) NOT NULL DEFAULT '',
  32      pref_name VARCHAR(32) NOT NULL,
  33      pref_value TEXT NULL,
  34  
  35      PRIMARY KEY (pref_uid, pref_scope, pref_name)
  36  )
  37  GO
  38  
  39  GRANT SELECT, INSERT, UPDATE, DELETE ON horde_prefs TO horde
  40  GO
  41  
  42  CREATE INDEX pref_uid_idx ON horde_prefs (pref_uid)
  43  CREATE INDEX pref_scope_idx ON horde_prefs (pref_scope)
  44  GO
  45  
  46  CREATE TABLE horde_datatree (
  47      datatree_id INT NOT NULL,
  48      group_uid VARCHAR(255) NOT NULL,
  49      user_uid VARCHAR(255) NOT NULL,
  50      datatree_name VARCHAR(255) NOT NULL,
  51      datatree_parents VARCHAR(255) NOT NULL,
  52      datatree_order INT,
  53      datatree_data TEXT,
  54      datatree_serialized SMALLINT DEFAULT 0 NOT NULL,
  55  
  56      PRIMARY KEY (datatree_id)
  57  )
  58  GO
  59  
  60  GRANT SELECT, INSERT, UPDATE, DELETE ON horde_datatree TO horde
  61  GO
  62  
  63  CREATE INDEX datatree_datatree_name_idx ON horde_datatree (datatree_name)
  64  CREATE INDEX datatree_group_idx ON horde_datatree (group_uid)
  65  CREATE INDEX datatree_user_idx ON horde_datatree (user_uid)
  66  CREATE INDEX datatree_serialized_idx ON horde_datatree (datatree_serialized)
  67  GO
  68  
  69  CREATE TABLE horde_datatree_attributes (
  70      datatree_id INT NOT NULL,
  71      attribute_name VARCHAR(255) NOT NULL,
  72      attribute_key VARCHAR(255) DEFAULT '' NOT NULL,
  73      attribute_value TEXT
  74  )
  75  GO
  76  
  77  GRANT SELECT, INSERT, UPDATE, DELETE ON horde_datatree TO horde
  78  GO
  79  
  80  CREATE INDEX datatree_attribute_idx ON horde_datatree_attributes (datatree_id)
  81  CREATE INDEX datatree_attribute_name_idx ON horde_datatree_attributes (attribute_name)
  82  CREATE INDEX datatree_attribute_key_idx ON horde_datatree_attributes (attribute_key)
  83  GO
  84  
  85  CREATE TABLE horde_tokens (
  86      token_address VARCHAR(100) NOT NULL,
  87      token_id VARCHAR(32) NOT NULL,
  88      token_timestamp BIGINT NOT NULL,
  89  
  90      PRIMARY KEY (token_address, token_id)
  91  )
  92  GO
  93  
  94  GRANT SELECT, INSERT, UPDATE, DELETE ON horde_tokens TO horde
  95  GO
  96  
  97  CREATE TABLE horde_vfs (
  98      vfs_id BIGINT NOT NULL,
  99      vfs_type SMALLINT NOT NULL,
 100      vfs_path VARCHAR(255) NOT NULL,
 101      vfs_name VARCHAR(255) NOT NULL,
 102      vfs_modified BIGINT NOT NULL,
 103      vfs_owner VARCHAR(255) NOT NULL,
 104      vfs_data TEXT,
 105  
 106      PRIMARY KEY   (vfs_id)
 107  )
 108  GO
 109  
 110  GRANT SELECT, INSERT, UPDATE, DELETE ON horde_vfs TO horde
 111  GO
 112  
 113  CREATE INDEX vfs_path_idx ON horde_vfs (vfs_path)
 114  CREATE INDEX vfs_name_idx ON horde_vfs (vfs_name)
 115  GO
 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  GO
 129  
 130  GRANT SELECT, INSERT, UPDATE, DELETE ON horde_histories TO horde
 131  GO
 132  
 133  CREATE INDEX history_action_idx ON horde_histories (history_action)
 134  CREATE INDEX history_ts_idx ON horde_histories (history_ts)
 135  CREATE INDEX history_uid_idx ON horde_histories (object_uid)
 136  GO


Généré le : Sun Feb 25 18:01:28 2007 par Balluche grâce à PHPXref 0.7