pgsql/update_tables_0.5.x-0.6.pgsql
branchv0.6.x
changeset 387 05dc4e1f8dff
parent 382 5e6bcb2e010e
child 388 dd95ed5bc9d2
equal deleted inserted replaced
386:b7854259ad74 387:05dc4e1f8dff
    71     uid         bigint NOT NULL,
    71     uid         bigint NOT NULL,
    72     path        varchar(16) NOT NULL,
    72     path        varchar(16) NOT NULL,
    73     current     bigint NOT NULL DEFAULT 0,
    73     current     bigint NOT NULL DEFAULT 0,
    74     CONSTRAINT  pkey_userquota_11 PRIMARY KEY (uid, path),
    74     CONSTRAINT  pkey_userquota_11 PRIMARY KEY (uid, path),
    75     CONSTRAINT  fkey_userquota_11_uid_users FOREIGN KEY (uid)
    75     CONSTRAINT  fkey_userquota_11_uid_users FOREIGN KEY (uid)
    76         REFERENCES users (uid)
    76         REFERENCES users (uid) ON DELETE CASCADE
    77 );
    77 );
    78 
    78 
    79 CREATE OR REPLACE FUNCTION merge_userquota_11() RETURNS TRIGGER AS $$
    79 CREATE OR REPLACE FUNCTION merge_userquota_11() RETURNS TRIGGER AS $$
    80 BEGIN
    80 BEGIN
    81     UPDATE userquota_11
    81     UPDATE userquota_11