projects
/
aymargeddon
/
current.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
adjust sql and scripts in var/ to new Mysql 5.x syntax
[aymargeddon/current.git]
/
var
/
from_scratch
diff --git
a/var/from_scratch
b/var/from_scratch
old mode 100644
(file)
new mode 100755
(executable)
index
ed14424
..
b45ff47
--- a/
var/from_scratch
+++ b/
var/from_scratch
@@
-1,8
+1,30
@@
+# with this script you can delete the whole database but still use
+# LOCALIZE and PLAYER tables.
+#
+# to init an empty database you have to do an
+# ./do.sql < LOCALIZE_INIT.sql
+# first.
+
+echo "dumping LOCALIZE.sql ..."
+
mysqldump -u aymargeddon -p`cat ../+secrets` -c --add-drop-table RAGNAROEK LOCALIZE \
> LOCALIZE.sql
mysqldump -u aymargeddon -p`cat ../+secrets` -c --add-drop-table RAGNAROEK LOCALIZE \
> LOCALIZE.sql
+
+echo "dumping +PLAYER.sql ..."
+
mysqldump -u aymargeddon -p`cat ../+secrets` -c --add-drop-table RAGNAROEK PLAYER \
> ./+PLAYER.sql
mysqldump -u aymargeddon -p`cat ../+secrets` -c --add-drop-table RAGNAROEK PLAYER \
> ./+PLAYER.sql
+echo "reading RAGNAROEK.sql ..."
+
./do_sql < RAGNAROEK.sql
./do_sql < RAGNAROEK.sql
+
+echo "reading LOCALIZE.sql ..."
+
./do_sql < LOCALIZE.sql
./do_sql < LOCALIZE.sql
+
+echo "reading +PLAYER.sql ..."
+
./do_sql < ./+PLAYER.sql
./do_sql < ./+PLAYER.sql
+
+echo "ready."