Ignore:
Timestamp:
12/10/13 17:47:44 (10 years ago)
Author:
Kris Deugau
Message:

/branches/stable

Merge reverse DNS and location work; 2 of mumble

Numerous conflicts due to hand-copy or partial merges

Location:
branches/stable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/stable

  • branches/stable/dns.sql

    r544 r545  
    1414
    1515COPY misc (misc_id, key, value) FROM stdin;
    16 1       dbversion       1.0
    17 \.
     161       dbversion       1.2
     17\.
     18
     19CREATE TABLE locations (
     20    location character varying (4) PRIMARY KEY,
     21    loc_id serial UNIQUE,
     22    group_id integer NOT NULL DEFAULT 1,
     23    iplist text NOT NULL DEFAULT '',
     24    description character varying(40) NOT NULL DEFAULT '',
     25    comments text NOT NULL DEFAULT ''
     26);
    1827
    1928CREATE TABLE default_records (
     
    54631       1       hostmaster.ADMINDOMAIN:ns1.ADMINDOMAIN  6       3600:900:1048576:2560   3600   
    55642       1       unused-%r.ADMINDOMAIN   65283   ZONE    3600   
     653       1       ns2.example.com 2       ZONE    7200    \N
     664       1       ns1.example.com 2       ZONE    7200    \N
    5667\.
    5768
    5869CREATE TABLE domains (
    5970    domain_id serial NOT NULL,
    60     "domain" character varying(80) NOT NULL,
     71    "domain" character varying(80) NOT NULL PRIMARY KEY,
    6172    group_id integer DEFAULT 1 NOT NULL,
    6273    description character varying(255) DEFAULT ''::character varying NOT NULL,
    6374    status integer DEFAULT 1 NOT NULL,
    6475    zserial integer,
    65     sertype character(1) DEFAULT 'D'::bpchar
     76    sertype character(1) DEFAULT 'D'::bpchar,
     77    changed boolean DEFAULT true NOT NULL,
     78    default_location character varying (4) DEFAULT '' NOT NULL
    6679);
    6780
    6881CREATE TABLE revzones (
    6982    rdns_id serial NOT NULL,
    70     revnet cidr NOT NULL,
     83    revnet cidr NOT NULL PRIMARY KEY,
    7184    group_id integer DEFAULT 1 NOT NULL,
    7285    description character varying(255) DEFAULT ''::character varying NOT NULL,
    7386    status integer DEFAULT 1 NOT NULL,
    7487    zserial integer,
    75     sertype character(1) DEFAULT 'D'::bpchar
     88    sertype character(1) DEFAULT 'D'::bpchar,
     89    changed boolean DEFAULT true NOT NULL,
     90    default_location character varying (4) DEFAULT '' NOT NULL
    7691);
    7792
     
    119134    record_edit boolean DEFAULT false NOT NULL,
    120135    record_delete boolean DEFAULT false NOT NULL,
     136    record_locchg boolean DEFAULT false NOT NULL,
     137    location_create boolean DEFAULT false NOT NULL,
     138    location_edit boolean DEFAULT false NOT NULL,
     139    location_delete boolean DEFAULT false NOT NULL,
     140    location_view boolean DEFAULT false NOT NULL,
    121141    user_id integer UNIQUE,
    122142    group_id integer UNIQUE
     
    124144
    125145-- Need *two* basic permissions;  one for the initial group, one for the default admin user
    126 COPY 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;
    127 1       f       f       f       f       f       f       f       f       t       t       t       t       t       t       \N      1
    128 2       t       f       f       f       f       f       f       f       f       f       f       f       f       f       1       \N
     146COPY 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, record_locchg, location_create, location_edit, location_delete, location_view, user_id, group_id) FROM stdin;
     1471       f       f       f       f       f       f       f       f       t       t       t       t       t       t       f       f       f       f       f       \N      1
     1482       t       f       f       f       f       f       f       f       f       f       f       f       f       f       f       f       f       f       f       1       \N
    129149\.
    130150
     
    141161    port integer DEFAULT 0 NOT NULL,
    142162    ttl integer DEFAULT 7200 NOT NULL,
    143     description text
     163    description text,
     164    location character varying (4) DEFAULT '' NOT NULL
    144165);
    145166
     
    156177COPY rectypes (val, name, stdflag, listorder, alphaorder) FROM stdin;
    1571781       A       1       1       1
    158 2       NS      1       5       37
     1792       NS      2       9       37
    1591803       MD      5       255     29
    1601814       MF      5       255     30
    161 5       CNAME   1       7       9
     1825       CNAME   2       11      9
    1621836       SOA     0       0       53
    1631847       MB      5       255     28
     
    16618710      NULL    5       255     43
    16718811      WKS     5       255     64
    168 12      PTR     3       10      46
     18912      PTR     3       5       46
    16919013      HINFO   5       255     18
    17019114      MINFO   5       255     32
    171 15      MX      1       6       34
    172 16      TXT     1       8       60
     19215      MX      1       10      34
     19316      TXT     2       12      60
    17319417      RP      4       255     48
    17419518      AFSDB   5       255     4
     
    18720831      EID     5       255     15
    18820932      NIMLOC  5       255     36
    189 33      SRV     1       9       55
     21033      SRV     1       13      55
    19021134      ATMA    5       255     6
    19121235      NAPTR   5       255     35
     
    22624765280   A+PTR   2       2       2
    22724865281   AAAA+PTR        2       4       4
    228 65282   PTR template    3       11      2
    229 65283   A+PTR template  3       12      2
    230 65284   AAAA+PTR template       3       13      2
     24965282   PTR template    3       6       2
     25065283   A+PTR template  2       7       2
     25165284   AAAA+PTR template       8       13      2
     25265285   Delegation      2       8       2
    231253\.
    232254
     
    262284
    263285ALTER TABLE ONLY domains
    264     ADD CONSTRAINT domains_pkey PRIMARY KEY ("domain");
    265 
    266 ALTER TABLE ONLY domains
    267286    ADD CONSTRAINT domains_domain_id_key UNIQUE (domain_id);
    268287
     
    284303-- foreign keys
    285304-- fixme: permissions FK refs
     305ALTER TABLE ONLY locations
     306    ADD CONSTRAINT "locations_group_id_fkey" FOREIGN KEY (group_id) REFERENCES groups(group_id);
     307
    286308ALTER TABLE ONLY domains
     309    ADD CONSTRAINT "$1" FOREIGN KEY (group_id) REFERENCES groups(group_id);
     310
     311ALTER TABLE ONLY revzones
    287312    ADD CONSTRAINT "$1" FOREIGN KEY (group_id) REFERENCES groups(group_id);
    288313
     
    299324SELECT pg_catalog.setval('misc_misc_id_seq', 2, false);
    300325SELECT pg_catalog.setval('default_records_record_id_seq', 8, false);
    301 SELECT pg_catalog.setval('default_rev_records_record_id_seq', 3, false);
     326SELECT pg_catalog.setval('default_rev_records_record_id_seq', 5, false);
    302327SELECT pg_catalog.setval('domains_domain_id_seq', 1, false);
    303328SELECT pg_catalog.setval('groups_group_id_seq', 2, false);
Note: See TracChangeset for help on using the changeset viewer.