File: 20010126.sql

package info (click to toggle)
fusionforge 5.3.2%2B20141104-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 60,472 kB
  • sloc: php: 271,846; sql: 36,817; python: 14,575; perl: 6,406; sh: 5,980; xml: 4,294; pascal: 1,411; makefile: 911; cpp: 52; awk: 27
file content (51 lines) | stat: -rw-r--r-- 1,455 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
-- by: apzen
-- purpose: stuff for project database and vhost maintanance

     CREATE TABLE prdb_dbs (
        dbid SERIAL PRIMARY KEY,
        group_id INT NOT NULL,
        dbname TEXT NOT NULL,
        dbusername TEXT NOT NULL,
        dbuserpass TEXT NOT NULL,
        requestdate INT NOT NULL,
        dbtype INT NOT NULL,
        created_by INT NOT NULL,
        state INT NOT NULL
    );

    CREATE TABLE prdb_states (

        stateid INT NOT NULL,
        statename TEXT
    );

	CREATE UNIQUE INDEX idx_prdb_dbname ON prdb_dbs (dbname);

    INSERT INTO prdb_states VALUES ('1', 'Active');
    INSERT INTO prdb_states VALUES ('2', 'Pending Create');
    INSERT INTO prdb_states VALUES ('3', 'Pending Delete');
    INSERT INTO prdb_states VALUES ('4', 'Pending Update');
    INSERT INTO prdb_states VALUES ('5', 'Failed Create');
    INSERT INTO prdb_states VALUES ('6', 'Failed Delete');
	INSERT INTO prdb_states VALUES ('7', 'Failed Update');

    CREATE TABLE prdb_types (
        dbtypeid INT PRIMARY KEY,
        dbservername TEXT NOT NULL,
        dbsoftware TEXT NOT NULL
    );

   INSERT INTO prdb_types VALUES ('1','pr-db1','mysql');

    CREATE TABLE prweb_vhost (
        vhostid SERIAL PRIMARY KEY,
        vhost_name TEXT,
        docdir TEXT,
		cgidir TEXT,
        group_id INT NOT NULL
    );

   CREATE INDEX idx_vhost_groups ON prweb_vhost (group_id);

   CREATE UNIQUE INDEX idx_vhost_hostnames ON prweb_vhost(vhost_name);