+++ /dev/null
--- Assume a view 'git_users' that has the columns userid and sshkey
-
-CREATE TABLE repositories(
- repoid SERIAL NOT NULL PRIMARY KEY,
- name varchar(64) NOT NULL UNIQUE,
- description text NOT NULL,
- anonymous bool NOT NULL default 'f',
- web bool NOT NULL default 'f',
- approved bool NOT NULL DEFAULT 'f'
-);
-
-CREATE TABLE repository_permissions (
- id SERIAL NOT NULL PRIMARY KEY,
- repository int NOT NULL REFERENCES repositories(repoid),
- userid text NOT NULL, -- intentionally not putting a foreign key here
- level int NOT NULL DEFAULT 0,
- CONSTRAINT levelcheck CHECK (level IN (0,1,2))
-);
-
-CREATE UNIQUE INDEX idx_repo_perm_rep_uid ON repository_permissions (repository, userid);
-
-
--- This is where we store the synchronized keys
-CREATE TABLE git_users(userid text PRIMARY KEY, sshkey text);
-