Changeset 370 for trunk/dns.sql


Ignore:
Timestamp:
07/29/12 22:02:48 (12 years ago)
Author:
Kris Deugau
Message:

/trunk

Checkpoint; adding location/view support. See #10.

  • add location to menu
  • add table and link fields to initial tabledef and upgrade SQL
  • add listing subs and list page
  • update permissions list and subpage template with new permissions
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns.sql

    r369 r370  
    16161       dbversion       1.2
    1717\.
     18
     19CREATE TABLE locations (
     20    location character varying (4) PRIMARY KEY,
     21    group_id integer NOT NULL DEFAULT 1,
     22    iplist text NOT NULL DEFAULT '',
     23    description text NOT NULL DEFAULT ''
     24);
    1825
    1926CREATE TABLE default_records (
     
    6673    zserial integer,
    6774    sertype character(1) DEFAULT 'D'::bpchar,
    68     changed boolean DEFAULT true NOT NULL
     75    changed boolean DEFAULT true NOT NULL,
     76    default_location character varying (4) DEFAULT '' NOT NULL
    6977);
    7078
     
    7785    zserial integer,
    7886    sertype character(1) DEFAULT 'D'::bpchar,
    79     changed boolean DEFAULT true NOT NULL
     87    changed boolean DEFAULT true NOT NULL,
     88    default_location character varying (4) DEFAULT '' NOT NULL
    8089);
    8190
     
    123132    record_edit boolean DEFAULT false NOT NULL,
    124133    record_delete boolean DEFAULT false NOT NULL,
     134    location_create boolean DEFAULT false NOT NULL,
     135    location_edit boolean DEFAULT false NOT NULL,
     136    location_delete boolean DEFAULT false NOT NULL,
     137    location_view boolean DEFAULT false NOT NULL,
    125138    user_id integer UNIQUE,
    126139    group_id integer UNIQUE
     
    129142-- Need *two* basic permissions;  one for the initial group, one for the default admin user
    130143COPY permissions (permission_id, admin, self_edit, group_create, group_edit, group_delete, user_create, user_edit, user_delete, domain_create, domain_edit, domain_delete, record_create, record_edit, record_delete, user_id, group_id) FROM stdin;
    131 1       f       f       f       f       f       f       f       f       t       t       t       t       t       t       \N      1
    132 2       t       f       f       f       f       f       f       f       f       f       f       f       f       f       1       \N
     1441       f       f       f       f       f       f       f       f       t       t       t       t       t       t       f       f       f       f       \N      1
     1452       t       f       f       f       f       f       f       f       f       f       f       f       f       f       f       f       f       f       1       \N
    133146\.
    134147
     
    145158    port integer DEFAULT 0 NOT NULL,
    146159    ttl integer DEFAULT 7200 NOT NULL,
    147     description text
     160    description text,
     161    default_location character varying (4) DEFAULT '' NOT NULL
    148162);
    149163
     
    289303-- foreign keys
    290304-- fixme: permissions FK refs
     305ALTER TABLE ONLY locations
     306    ADD CONSTRAINT "locations_group_id_fkey" FOREIGN KEY (group_id) REFERENCES groups(group_id);
     307
    291308ALTER TABLE ONLY domains
    292309    ADD CONSTRAINT "$1" FOREIGN KEY (group_id) REFERENCES groups(group_id);
Note: See TracChangeset for help on using the changeset viewer.