Skip to content

Commit b2c4f8e

Browse files
committed
migration script fix
1 parent bc4871a commit b2c4f8e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pg_pathman--1.2--1.3.sql

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,23 @@ ADD CHECK (@extschema@.validate_interval_value(partrel,
1616
parttype,
1717
range_interval));
1818

19+
/*
20+
* Drop check constraint to be able to update column type. We recreate it
21+
* later and it will be slightly different
22+
*/
23+
DROP FUNCTION @extschema@.validate_part_callback(REGPROC, BOOL) CASCADE;
24+
1925
/* Change type for init_callback attribute */
2026
ALTER TABLE @extschema@.pathman_config_params
2127
ALTER COLUMN init_callback TYPE TEXT,
28+
ALTER COLUMN init_callback DROP NOT NULL,
2229
ALTER COLUMN init_callback SET DEFAULT NULL;
2330

2431
/* Set init_callback to NULL where it used to be 0 */
2532
UPDATE @extschema@.pathman_config_params
2633
SET init_callback = NULL
2734
WHERE init_callback = '-';
2835

29-
DROP FUNCTION @extschema@.validate_part_callback(REGPROC, BOOL);
30-
3136
CREATE OR REPLACE FUNCTION @extschema@.validate_part_callback(
3237
callback REGPROCEDURE,
3338
raise_error BOOL DEFAULT TRUE)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy