Skip to content

Commit 1ea11c9

Browse files
committed
Remove code to deal with multiversion downgrade
We only ever generated downgrade script for previous version so this codepath was untested and removing allows us to get rid of OLD_REV_FILES list, simplifying the release generation.
1 parent 9a443d6 commit 1ea11c9

2 files changed

Lines changed: 0 additions & 69 deletions

File tree

CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,6 @@ option(EXPERIMENTAL "Skip postgres version compatibility check" OFF)
191191
option(GENERATE_DOWNGRADE_SCRIPT
192192
"Generate downgrade script. Defaults to not generate a downgrade script."
193193
OFF)
194-
cmake_dependent_option(
195-
GENERATE_OLD_DOWNGRADE_SCRIPTS
196-
"Generate downgrade scripts for old versions. Requires setting GENERATE_DOWNGRADE_SCRIPT to ON. Defaults to OFF."
197-
OFF
198-
"GENERATE_DOWNGRADE_SCRIPT"
199-
ON)
200194

201195
if(CMAKE_BUILD_TYPE MATCHES Debug)
202196
# CMAKE_BUILD_TYPE is set at CMake configuration type. But usage of

sql/CMakeLists.txt

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -52,49 +52,6 @@ set(MOD_FILES
5252
# specified in version.config
5353
set(CURRENT_REV_FILE reverse-dev.sql)
5454

55-
# Files for generating old downgrade scripts. This should only include files for
56-
# downgrade from one version to its previous version since we do not support
57-
# skipping versions when downgrading.
58-
set(OLD_REV_FILES
59-
2.9.1--2.9.0.sql
60-
2.9.2--2.9.1.sql
61-
2.9.3--2.9.2.sql
62-
2.10.0--2.9.3.sql
63-
2.10.1--2.10.0.sql
64-
2.10.2--2.10.1.sql
65-
2.10.3--2.10.2.sql
66-
2.11.0--2.10.3.sql
67-
2.11.1--2.11.0.sql
68-
2.11.2--2.11.1.sql
69-
2.12.0--2.11.2.sql
70-
2.12.1--2.12.0.sql
71-
2.12.2--2.12.1.sql
72-
2.13.0--2.12.2.sql
73-
2.13.1--2.13.0.sql
74-
2.14.0--2.13.1.sql
75-
2.14.1--2.14.0.sql
76-
2.14.2--2.14.1.sql
77-
2.15.0--2.14.2.sql
78-
2.15.1--2.15.0.sql
79-
2.15.2--2.15.1.sql
80-
2.15.3--2.15.2.sql
81-
2.16.0--2.15.3.sql
82-
2.16.1--2.16.0.sql
83-
2.17.0--2.16.1.sql
84-
2.17.1--2.17.0.sql
85-
2.17.2--2.17.1.sql
86-
2.18.0--2.17.2.sql
87-
2.18.1--2.18.0.sql
88-
2.18.2--2.18.1.sql
89-
2.19.0--2.18.2.sql
90-
2.19.1--2.19.0.sql
91-
2.19.2--2.19.1.sql
92-
2.19.3--2.19.2.sql
93-
2.20.0--2.19.3.sql
94-
2.20.1--2.20.0.sql
95-
2.20.2--2.20.1.sql
96-
2.20.3--2.20.2.sql)
97-
9855
set(MODULE_PATHNAME "$libdir/timescaledb-${PROJECT_VERSION_MOD}")
9956
set(LOADER_PATHNAME "$libdir/timescaledb")
10057

@@ -121,26 +78,6 @@ else()
12178
${CMAKE_CURRENT_SOURCE_DIR}/updates
12279
FILES
12380
${CURRENT_REV_FILE})
124-
if(GENERATE_OLD_DOWNGRADE_SCRIPTS)
125-
foreach(_downgrade_file ${OLD_REV_FILES})
126-
if(${_downgrade_file} MATCHES
127-
"([0-9]+\\.[0-9]+\\.*[0-9]*)--([0-9]+\\.[0-9]+\\.*[0-9]*).sql")
128-
set(_source_version ${CMAKE_MATCH_1})
129-
set(_target_version ${CMAKE_MATCH_2})
130-
generate_downgrade_script(
131-
SOURCE_VERSION
132-
${_source_version}
133-
TARGET_VERSION
134-
${_target_version}
135-
INPUT_DIRECTORY
136-
${CMAKE_CURRENT_SOURCE_DIR}/updates
137-
FILES
138-
${_downgrade_file})
139-
else()
140-
message(FATAL_ERROR "${_downgrade_file} is not a downgrade file")
141-
endif()
142-
endforeach()
143-
endif()
14481
endif()
14582

14683
# Function to replace @MODULE_PATHNAME@ in source files, producing an output

0 commit comments

Comments
 (0)