Changeset 779 for trunk


Ignore:
Timestamp:
10/07/15 17:58:42 (9 years ago)
Author:
Kris Deugau
Message:

/trunk

Begin adding configuration backup fields with the tabledef and link to
the allocations/poolips tables. See #52.

Also note an index for composite key that may not be useful

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/ipdb-2.7-3.0.sql

    r762 r779  
    1313);
    1414
     15-- Store backup fields in a separate table
     16CREATE TABLE backuplist (
     17    backup_id serial NOT NULL,
     18    bkbrand text,
     19    bkmodel text,
     20    bktype text,
     21    bkport integer,
     22    bksrc text,
     23    bkuser text,
     24    bkvpass text,
     25    bkepass text,
     26    ip inet
     27);
     28
    1529-- Master and routed blocks now live in the allocations table.
    1630
     
    2034ALTER TABLE allocations ADD COLUMN parent_id integer NOT NULL DEFAULT 0;
    2135ALTER TABLE allocations ADD COLUMN master_id integer NOT NULL DEFAULT 0;
     36ALTER TABLE allocations ADD COLUMN backup_id integer NOT NULL DEFAULT 0;
    2237ALTER TABLE allocations DROP CONSTRAINT allocations_pkey;
    2338ALTER TABLE allocations ADD COLUMN id serial PRIMARY KEY;
     39-- not certain this is right
    2440CREATE UNIQUE INDEX allocations_skey ON allocations (cidr,vrf,type);
    2541
     
    3753ALTER TABLE poolips ADD COLUMN parent_id integer NOT NULL DEFAULT 0;
    3854ALTER TABLE poolips ADD COLUMN master_id integer NOT NULL DEFAULT 0;
     55ALTER TABLE poolips ADD COLUMN backup_id integer NOT NULL DEFAULT 0;
    3956ALTER TABLE poolips DROP CONSTRAINT poolips_pkey;
    4057ALTER TABLE poolips ADD COLUMN id serial;
Note: See TracChangeset for help on using the changeset viewer.