Skip to content

Commit 9057fe4

Browse files
authored
Merge pull request #135 from citusdata/fix-migration-scripts
Stop generating migration files for each version
2 parents bd1eba0 + cd14247 commit 9057fe4

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@ regression.diffs
77
results
88
.deps/
99

10-
hll--*.*.sql
11-
!update/hll--*.*.sql
10+
/*.sql

Makefile

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
EXTENSION = hll
15-
EXTVERSIONS = 2.10 2.11 2.12 2.13 2.14 2.15 2.16
16-
17-
DATA_built = $(foreach v,$(EXTVERSIONS),$(EXTENSION)--$(v).sql) $(wildcard $(EXTENSION)--*--*.sql)
15+
sql_files = $(wildcard update/$(EXTENSION)--*.sql)
16+
generated_sql_files = $(patsubst update/%,%,$(sql_files))
17+
DATA_built = $(generated_sql_files)
1818

1919
MODULE_big = $(EXTENSION)
2020
OBJS = $(patsubst %.c,%.o,$(wildcard src/*.c)) $(patsubst %.cpp,%.o,$(wildcard src/*.cpp))
@@ -34,16 +34,3 @@ src/hll.o: override CFLAGS += -std=c99
3434

3535
%.sql: update/%.sql
3636
$(SQLPP) $^ > $@
37-
38-
$(EXTENSION)--2.11.sql: $(EXTENSION)--2.10.sql $(EXTENSION)--2.10--2.11.sql
39-
cat $^ > $@
40-
$(EXTENSION)--2.12.sql: $(EXTENSION)--2.11.sql $(EXTENSION)--2.11--2.12.sql
41-
cat $^ > $@
42-
$(EXTENSION)--2.13.sql: $(EXTENSION)--2.12.sql $(EXTENSION)--2.12--2.13.sql
43-
cat $^ > $@
44-
$(EXTENSION)--2.14.sql: $(EXTENSION)--2.13.sql $(EXTENSION)--2.13--2.14.sql
45-
cat $^ > $@
46-
$(EXTENSION)--2.15.sql: $(EXTENSION)--2.14.sql $(EXTENSION)--2.14--2.15.sql
47-
cat $^ > $@
48-
$(EXTENSION)--2.16.sql: $(EXTENSION)--2.15.sql $(EXTENSION)--2.15--2.16.sql
49-
cat $^ > $@

0 commit comments

Comments
 (0)