Changeset 352 for cpc/trunk/project/bin
- Timestamp:
- Aug 30, 2009, 2:44:06 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpc/trunk/project/bin/loadsql
r227 r352 1 1 #!/bin/bash 2 2 MYSQLID="-u root" 3 echo "SET FOREIGN_KEY_CHECKS = 0;" > /tmp/drop.sql4 echo "SET FOREIGN_KEY_CHECKS = 0;" > /tmp/delete.sql5 echo "SHOW TABLES" | mysql $MYSQLID cpc | grep -v Tables_ > /tmp/tables.sql6 cat /tmp/tables.sql | sed 's/^/DROP TABLE /' | sed 's/$/;/' >> /tmp/drop.sql7 cat /tmp/drop.sql | mysql $MYSQLID cpc8 cat /tmp/tables.sql | sed 's/^/CREATE TABLE /' | sed 's/$/;/' > /tmp/create.sql9 cat /tmp/create.sql | mysql $MYSQLID cpc10 cat /tmp/tables.sql | sed 's/^/DELETE FROM /' | sed 's/$/;/' >> /tmp/delete.sql3 #echo "SET FOREIGN_KEY_CHECKS = 0;" > /tmp/drop.sql 4 #echo "SET FOREIGN_KEY_CHECKS = 0;" > /tmp/delete.sql 5 #echo "SHOW TABLES" | mysql $MYSQLID cpc | grep -v Tables_ > /tmp/tables.sql 6 #cat /tmp/tables.sql | sed 's/^/DROP TABLE /' | sed 's/$/;/' >> /tmp/drop.sql 7 #cat /tmp/drop.sql | mysql $MYSQLID cpc 8 #cat /tmp/tables.sql | sed 's/^/CREATE TABLE /' | sed 's/$/;/' > /tmp/create.sql 9 #cat /tmp/create.sql | mysql $MYSQLID cpc 10 #cat /tmp/tables.sql | sed 's/^/DELETE FROM /' | sed 's/$/;/' >> /tmp/delete.sql 11 11 php symfony doctrine:build-all-reload --no-confirmation 12 cat /tmp/delete.sql | mysql $MYSQLID cpc13 rm /tmp/tables.sql /tmp/drop.sql /tmp/create.sql /tmp/delete.sql12 #cat /tmp/delete.sql | mysql $MYSQLID cpc 13 #rm /tmp/tables.sql /tmp/drop.sql /tmp/create.sql /tmp/delete.sql 14 14 zcat data/sql/data.sql.gz | grep -v '`blog`' | grep -v '`tag_template`' | mysql $MYSQLID cpc 15 php symfony set:Vacances15 #php symfony set:Vacances
Note: See TracChangeset
for help on using the changeset viewer.