~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to userdb/users.sql

  • Committer: William Grant
  • Date: 2010-07-27 10:44:14 UTC
  • mto: This revision was merged to the branch mainline in revision 1824.
  • Revision ID: grantw@unimelb.edu.au-20100727104414-meuycir4c0dqbpe2
Update schema, add missing UNIQUE constraint, and update sample data.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
CREATE TABLE semester (
53
53
    semesterid  SERIAL PRIMARY KEY NOT NULL,
54
54
    year        TEXT NOT NULL CHECK (valid_url_name(year)),
55
 
    semester    TEXT NOT NULL CHECK (valid_url_name(semester)),
 
55
    url_name    TEXT NOT NULL CHECK (valid_url_name(url_name)),
 
56
    code        TEXT NOT NULL,
 
57
    display_name TEXT NOT NULL,
56
58
    state       TEXT NOT NULL CHECK (state IN ('disabled', 'past',
57
59
                                    'current', 'future')) DEFAULT 'current',
58
 
    UNIQUE (year, semester)
 
60
    UNIQUE (year, url_name),
 
61
    UNIQUE (year, code)
59
62
);
60
63
 
61
64
CREATE TABLE offering (