Mercurial > ~dholland > hg > swallowtail > index.cgi
comparison database/schema/users.sql @ 29:cd36b49f4437
fix.
now loads into postgresql92
author | David A. Holland |
---|---|
date | Sun, 26 May 2013 23:24:45 -0400 |
parents | d4c3bd255653 |
children | 12a4c9f88510 |
comparison
equal
deleted
inserted
replaced
28:000519947282 | 29:cd36b49f4437 |
---|---|
46 responsible boolean not null, | 46 responsible boolean not null, |
47 editpr boolean not null, | 47 editpr boolean not null, |
48 admin boolean not null | 48 admin boolean not null |
49 | 49 |
50 -- responsible implies oldresponsible | 50 -- responsible implies oldresponsible |
51 check NOT (responsible AND NOT oldresponsible) | 51 check (oldresponsible OR NOT responsible) |
52 ) | 52 ) |
53 WITHOUT OIDS; | 53 WITHOUT OIDS; |
54 | 54 |
55 CREATE TABLE mailaddresses ( | 55 CREATE TABLE mailaddresses ( |
56 id bigint not null references users (id), | 56 id bigint not null references users (id), |
61 lastheardfrom timestamp | 61 lastheardfrom timestamp |
62 ) | 62 ) |
63 WITHOUT OIDS; | 63 WITHOUT OIDS; |
64 | 64 |
65 CREATE VIEW usermail AS | 65 CREATE VIEW usermail AS |
66 SELECT id, username, realname, email, | 66 SELECT users.id AS id, username, realname, email, |
67 mailto, responsible, editpr, admin | 67 mailto, responsible, editpr, admin |
68 FROM users, mailaddresses | 68 FROM users, mailaddresses |
69 WHERE users.id = mailaddresses.id AND mailaddresses.selected | 69 WHERE users.id = mailaddresses.id AND mailaddresses.selected |
70 ; | 70 ; |
71 | 71 |