From da4bd3b59efe63899e2271980cf1c7751b9fa6dc Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Wed, 1 Mar 2017 20:12:57 +0100 Subject: Add a Makefile to build an SQLite-compatible schema Allow for automatically converting the schema into a schema that works with SQLite by running `make` from the schema/ subdirectory. Use the new Makefile in the test suite. Signed-off-by: Lukas Fleischer --- schema/Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 schema/Makefile (limited to 'schema') diff --git a/schema/Makefile b/schema/Makefile new file mode 100644 index 00000000..e0448add --- /dev/null +++ b/schema/Makefile @@ -0,0 +1,11 @@ +aur-schema-sqlite.sql: aur-schema.sql + sed \ + -e 's/ ENGINE = InnoDB//' \ + -e 's/ [A-Z]* UNSIGNED NOT NULL AUTO_INCREMENT/ INTEGER NOT NULL/' \ + -e 's/([0-9, ]*) UNSIGNED / UNSIGNED /' \ + $< >$@ + +clean: + rm -rf aur-schema-sqlite.sql + +.PHONY: clean -- cgit v1.2.3-24-g4f1b