diff --git a/Makefile b/Makefile index e9a8831..b3a23c5 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,8 @@ CDBSCRIPTS = \ scripts-enabled/*.sql \ $(END) -DATA_built = $(EXTENSION)--$(EXTVERSION).sql +DATA_built = $(EXTENSION)--$(EXTVERSION).sql \ + $(EXTENSION)--unpackaged--$(EXTVERSION).sql DOCS = README.md REGRESS_NEW = test_ddl_triggers REGRESS_OLD = $(wildcard test/*.sql) @@ -26,6 +27,9 @@ $(EXTENSION)--$(EXTVERSION).sql: $(CDBSCRIPTS) cartodb_hooks.sql Makefile echo "GRANT USAGE ON SCHEMA cartodb TO public;" >> $@ cat cartodb_hooks.sql >> $@ +$(EXTENSION)--unpackaged--0.1.sql: $(EXTENSION)--$(EXTVERSION).sql util/create_from_unpackaged.sh Makefile + ./util/create_from_unpackaged.sh cartodb--unpackaged--0.1.sql + legacy_regress: $(REGRESS_OLD) Makefile mkdir -p sql/test/ mkdir -p expected/test/ diff --git a/util/create_from_unpackaged.sh b/util/create_from_unpackaged.sh new file mode 100755 index 0000000..fba47a2 --- /dev/null +++ b/util/create_from_unpackaged.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +input=cartodb--0.1.sql +output=cartodb--unpackaged--0.1.sql + +cat ${input} > ${output} + +# Migrate CDB_TableMetadata +cat >> ${output} <> ${output}