diff options
author | Yorhel <git@yorhel.nl> | 2015-10-21 02:19:15 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2015-10-21 02:28:48 +0200 |
commit | 9cf3eef0e0a7bde10a0e1bb8c94c38b058e5121d (patch) | |
tree | 9cbd3a439316bdfe3946cc80378e4f95a9d6e6db /Makefile | |
parent | 718f4d0258049aa92f229c08d5ec7204dae3ffa6 (diff) |
SQL: Fix editing + func.sql + triggers.sql + autocreate editing funcs
This changes quite a bit to the way the editing functions work. Because
these functions are very repetitive and it's easy to keep things out of
sync, I created a script to generate them automatically. I had to rename
a few function and table names for consistency to make this work.
Since database entries don't have a 'latest' column anymore, and since
the order in which tables are updated doesn't have to be fixed, I
dropped many of the SQL triggers and replaced them with a
edit_committed() function which is called from edit_*_commit() and
checks for stuff to be done.
Don't forget to run 'make' before importing the update script.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -48,7 +48,7 @@ update-2.10 update-2.11 update-2.12 update-2.13 update-2.14 update-2.15 update-2.16 update-2.17\ update-2.18 update-2.19 update-2.20 update-2.21 update-2.22 update-2.23 -all: dirs js skins robots data/config.pl +all: dirs js skins robots data/config.pl util/sql/editfunc.sql dirs: static/f/js static/ch static/cv static/sf static/st data/log www www/feeds www/api @@ -60,6 +60,9 @@ skins: $(shell ls static/s | sed -e 's/\(.\+\)/static\/s\/\1\/style.css/g') robots: dirs www/robots.txt static/robots.txt +util/sql/editfunc.sql: util/sqleditfunc.pl util/sql/schema.sql + util/sqleditfunc.pl + static/ch static/cv static/sf static/st: mkdir $@; for i in $$(seq -w 0 1 99); do mkdir "$@/$$i"; done @@ -138,7 +141,7 @@ define runpsql endef -sql-import: +sql-import: util/sql/editfunc.sql ${runpsql} < util/sql/all.sql |