root/trunk/midgard/tools/midrepository/global.sql

Revision 7101, 2.9 kB (checked in by bergius, 5 years ago)

Initial commit of the MidRepository? workflow extension
Issue number:
Obtained from:
Submitted by:
Reviewed by:

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1 CREATE TABLE proc (
2         id int(11) NOT NULL auto_increment,
3         proc_def_id int(11) NOT NULL default '0',
4         src_id int(11) NOT NULL default '0',
5         dest_id int(11) NOT NULL default '0',
6         step_def_id int(11) NOT NULL default '0',
7         collection_id int(11) NOT NULL default '0',
8         status smallint NOT NULL default '0',
9         comment longtext NOT NULL default '',
10         locker char(32) NOT NULL default '',
11         KEY (src_id, dest_id),
12         KEY (proc_def_id),
13         KEY (collection_id),
14         KEY (status),
15         PRIMARY KEY (id)
16 );
17
18 CREATE TABLE branch (
19         id int(11) NOT NULL auto_increment,
20         label varchar (255) NOT NULL default '',
21         PRIMARY KEY(id)
22 );
23
24
25 CREATE TABLE substep (
26         id int(11) NOT NULL auto_increment,
27         proc_id int(11) NOT NULL default '0',   
28         substep_def_id int(11) NOT NULL default '0',
29         PRIMARY KEY (id),
30         KEY proc_id(proc_id),
31         KEY substep_def_id(substep_def_id)
32 );
33
34
35 CREATE TABLE collection (
36         id int(11) NOT NULL auto_increment,
37         up int(11) NOT NULL default '0',
38         label varchar(255),
39         PRIMARY KEY (id),
40         KEY (up)
41 );
42
43 CREATE TABLE collection_pbr (
44         id int(11) NOT NULL auto_increment,
45         collection_id int(11) NOT NULL default '0',
46         pbr_id int(11) NOT NULL default '0',
47         PRIMARY KEY(id),
48         KEY collection_id(collection_id),
49         UNIQUE uniq(collection_id, pbr_id)
50 );
51
52 CREATE TABLE part (
53         id int(11) NOT NULL auto_increment,
54         guid char(32) NOT NULL default '',
55         PRIMARY KEY(id),
56         UNIQUE(guid)
57 );
58
59 CREATE TABLE part_branch (
60         id int(11) NOT NULL auto_increment,
61         part_id int(11) NOT NULL default '0',
62         branch_id int(11) NOT NULL default '0',
63         status smallint NOT NULL default '0',
64         pending_author char(32) NOT NULL default '',
65         lock_guid char(32) NOT NULL default '',
66         path longtext NOT NULL default '',
67         PRIMARY KEY(id),
68         UNIQUE(part_id, branch_id),
69         KEY(path(100)),
70         KEY(status)
71 );
72
73 CREATE TABLE part_branch_revision (     
74         id int(11) NOT NULL auto_increment,
75         part_branch_id int (11) NOT NULL default '0',
76         revision varchar(128) NOT NULL default '',
77         path longtext NOT NULL default '',
78         author char(32) NOT NULL default '',
79         created datetime NOT NULL default '0000-00-00 00:00',
80         deleted smallint NOT NULL default '0',
81         PRIMARY KEY (id),
82         KEY(path(100)),
83         UNIQUE guidrev(part_branch_id, revision)
84 );
85
86 CREATE TABLE dep_up (
87         id int(11) NOT NULL auto_increment,
88         part_branch_revision_id int(11) NOT NULL default '0',
89         dep char(32) NOT NULL default '',
90         PRIMARY KEY (id),
91         UNIQUE dep (part_branch_revision_id, dep)
92 );
93
94 CREATE TABLE dep_down (
95         id int(11) NOT NULL auto_increment,
96         guid char(32) NOT NULL default '',
97         dep char(32) NOT NULL default '',
98         lang int(11) NOT NULL default '0',
99         PRIMARY KEY (id),
100         UNIQUE dep (guid, dep)
101 );
102
103 CREATE TABLE comment (
104         id int(11) NOT NULL auto_increment,
105         ptable char(64) NOT NULL default '0',
106         oid int(11) NOT NULL default '0',
107         text longtext NOT NULL default '',
108         created datetime NOT NULL default '0000-00-00 00:00',
109         PRIMARY KEY (id),
110         KEY (ptable, oid)
111 );
112
113 INSERT INTO branch (label) VALUES ('HEAD'), ('LIVE');
Note: See TracBrowser for help on using the browser.