mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-17 02:53:51 +08:00
Fix downgrade script to make backports easier
While the downgrade script doesnt combine multiple version into a single script since we only create the script for the previous version, fixing this will make backporting in the release branch easier.
This commit is contained in:
parent
fc0e41cc13
commit
87430168b5
@ -88,7 +88,7 @@ BEGIN
|
|||||||
|
|
||||||
-- restore columns from the compressed hypertable
|
-- restore columns from the compressed hypertable
|
||||||
FOR column_name, column_type IN
|
FOR column_name, column_type IN
|
||||||
SELECT attname, atttypid::regtype FROM pg_attribute WHERE attrelid = chunk AND attnum > 0
|
SELECT attname, atttypid::regtype FROM pg_attribute WHERE attrelid = chunk AND attnum > 0 AND NOT attisdropped
|
||||||
LOOP
|
LOOP
|
||||||
cmd := format('ALTER TABLE %s ADD COLUMN %I %s', hypertable, column_name, column_type);
|
cmd := format('ALTER TABLE %s ADD COLUMN %I %s', hypertable, column_name, column_type);
|
||||||
EXECUTE cmd;
|
EXECUTE cmd;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user