mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-16 18:43:18 +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
|
||||
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
|
||||
cmd := format('ALTER TABLE %s ADD COLUMN %I %s', hypertable, column_name, column_type);
|
||||
EXECUTE cmd;
|
||||
|
Loading…
x
Reference in New Issue
Block a user