Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

32 lines (27 sloc) 0.986 kb
#! /bin/bash
echo "**** Dropping databases ****"
mysql -uroot -e "drop database multidb_main"
mysql -uroot -e "drop database multidb_accounts"
mysql -uroot -e "drop database multidb_shard1"
mysql -uroot -e "drop database multidb_shard2"
mysql -uroot -e "drop database multidb_shard3"
echo "**** Creating databases ****"
mysql -uroot -e "create database multidb_main"
mysql -uroot -e "create database multidb_accounts"
mysql -uroot -e "create database multidb_shard1"
mysql -uroot -e "create database multidb_shard2"
mysql -uroot -e "create database multidb_shard3"
echo "--- syncing default ---"
python manage.py syncdb --noinput
echo
echo "--- syncing accounts ---"
python manage.py syncdb --noinput --database=accounts
echo
echo "--- syncing shard0 ---"
python manage.py syncdb --noinput --database=shard0
echo
echo "--- syncing shard1 ---"
python manage.py syncdb --noinput --database=shard1
echo
echo "--- syncing shard2 ---"
python manage.py syncdb --noinput --database=shard2
Jump to Line
Something went wrong with that request. Please try again.