Changeset 317


Ignore:
Timestamp:
May 28, 2006, 5:44:12 PM (13 years ago)
Author:
Dominic Hargreaves
Message:

Delete orphaned content/metadata rows in Pg setup (closes #10)

Location:
wiki-toolkit/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wiki-toolkit/trunk/Changes

    r304 r317  
    33        Check that the database schema is up-to-date when initializing the
    44        store and abort otherwise.
     5        In PostgresSQL setup code, delete orphaned content/metadata rows.
    56
    670.69_03 13 May 2006
  • wiki-toolkit/trunk/lib/Wiki/Toolkit/Setup/Pg.pm

    r235 r317  
    9393        (SELECT id FROM node where node.name = content.name)
    9494|, qq|
     95DELETE FROM content WHERE node_id IS NULL;
    9596ALTER TABLE content ALTER COLUMN node_id SET NOT NULL;
    9697ALTER TABLE content DROP COLUMN name;
     
    104105        (SELECT id FROM node where node.name = metadata.node)
    105106|, qq|
     107DELETE FROM metadata WHERE node_id IS NULL;
    106108ALTER TABLE metadata ALTER COLUMN node_id SET NOT NULL;
    107109ALTER TABLE metadata DROP COLUMN node;
Note: See TracChangeset for help on using the changeset viewer.