aurweb/schema/Makefile
Lukas Fleischer da4bd3b59e 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 <lfleischer@archlinux.org>
2017-03-01 20:12:57 +01:00

11 lines
252 B
Makefile

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