Skip to content

Commit

Permalink
Fix 0.3.2 -> 0.4.0 update to drop the old create_parent() earlier so …
Browse files Browse the repository at this point in the history
…that the update doesn't complain about needing the old custom type
  • Loading branch information
keithf4 committed Feb 15, 2013
1 parent d072bbb commit 8c68300
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions updates/pg_partman--0.3.2--0.4.0.sql
Expand Up @@ -17,6 +17,9 @@ BEGIN
END
$$;

DROP FUNCTION @extschema@.create_parent(text, text, @extschema@.partition_type, text, int, boolean);
DROP TABLE @extschema@.part_grants;

ALTER TABLE @extschema@.part_config ADD COLUMN new_type text;
UPDATE @extschema@.part_config SET new_type = type;
ALTER TABLE @extschema@.part_config ALTER new_type SET NOT NULL;
Expand All @@ -25,8 +28,6 @@ DROP TYPE @extschema@.partition_type;
ALTER TABLE @extschema@.part_config RENAME new_type TO type;
ALTER TABLE @extschema@.part_config ADD CONSTRAINT part_config_type_check CHECK (@extschema@.check_partition_type(type));

DROP TABLE @extschema@.part_grants;
DROP FUNCTION @extschema@.create_parent(text, text, @extschema@.partition_type, text, int, boolean);

/*
* Function to apply ownership & privileges on child tables using parent table as reference
Expand Down

0 comments on commit 8c68300

Please sign in to comment.