Diff for "Code/MergeQueues/DBModels"

Not logged in - Log In / Register

Differences between revisions 5 and 7 (spanning 2 versions)
Revision 5 as of 2010-09-17 00:25:20
Size: 786
Editor: rockstar
Comment:
Revision 7 as of 2010-09-22 21:46:46
Size: 861
Editor: rockstar
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
{{{
ALTER TABLE Branch
   DROP COLUMN merge_robot;
Line 4: Line 7:
DROP TABLE `BranchMergeRobot`;
CREATE TABLE `BranchMergeQueue` (
ALTER TABLE Branch
   DROP COLUMN merge_control_status;

DROP TABLE BranchMergeRobot;


CREATE TABLE BranchMergeQueue (
Line 9: Line 17:
    name text NOT NULL,     name TEXT NOT NULL,
Line 11: Line 19:
    date_created timestamp without time zone DEFAULT timezone('UTC'::text, now()) NOT NULL);
ALTER TABLE `BranchQueue` ADD CONSTRAINT mergeowner_unique UNIQUE (owner, name);
CREATE TABLE `BranchQueue` (
    id serial NOT NULL PRIMARY KEY,
    configuration TEXT,
date_created timestamp without time zone DEFAULT timezone('UTC'::text, now()) NOT NULL,
    CONSTRAINT owner_name UNIQUE (owner, name)
)
;

CREATE TABLE BranchQueue (
Line 16: Line 26:
    queue integer NOT NULL REFERENCES BranchMergeQueue);
ALTER TABLE `BranchQueue` ADD CONSTRAINT branchqueue_unique UNIQUE (branch, queue);
ALTER TABLE `branch`
   ADD CO
LUMN `merge_queue_config` TEXT;
    queue integer NOT NULL REFERENCES BranchMergeQueue,
    CONSTRAINT branch_unique UNIQUE (branch)
    PRIMARY KEY (queue, branch)
);

ALTER TABLE Branch
  
ADD COLUMN merge_queue_config TEXT;


}}}

Merge Queues Database Model

ALTER TABLE Branch
   DROP COLUMN merge_robot;

ALTER TABLE Branch
   DROP COLUMN merge_control_status;

DROP TABLE BranchMergeRobot;


CREATE TABLE BranchMergeQueue (
    id serial NOT NULL PRIMARY KEY,
    registrant integer NOT NULL REFERENCES Person,
    owner integer NOT NULL REFERENCES Person,
    name TEXT NOT NULL,
    description TEXT,
    configuration TEXT,
    date_created timestamp without time zone DEFAULT timezone('UTC'::text, now()) NOT NULL,
    CONSTRAINT owner_name UNIQUE (owner, name)
);

CREATE TABLE BranchQueue (
    branch integer NOT NULL REFERENCES Branch,
    queue integer NOT NULL REFERENCES BranchMergeQueue,
    CONSTRAINT branch_unique UNIQUE (branch)
    PRIMARY KEY (queue, branch)
);

ALTER TABLE Branch
   ADD COLUMN merge_queue_config TEXT;

Code/MergeQueues/DBModels (last edited 2010-09-22 21:46:46 by rockstar)