forked from viabtc/viabtc_exchange_server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit_trade_history.sh
executable file
·36 lines (30 loc) · 1.06 KB
/
init_trade_history.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
MYSQL_HOST="localhost"
MYSQL_USER="user"
MYSQL_PASS="pass"
MYSQL_DB="trade_history"
for i in `seq 0 99`
do
echo "create table balance_history_$i"
mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS $MYSQL_DB -e "CREATE TABLE balance_history_$i LIKE balance_history_example;"
done
for i in `seq 0 99`
do
echo "create table order_history_$i"
mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS $MYSQL_DB -e "CREATE TABLE order_history_$i LIKE order_history_example;"
done
for i in `seq 0 99`
do
echo "create table order_detail_$i"
mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS $MYSQL_DB -e "CREATE TABLE order_detail_$i LIKE order_detail_example;"
done
for i in `seq 0 99`
do
echo "create table deal_history_$i"
mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS $MYSQL_DB -e "CREATE TABLE deal_history_$i LIKE deal_history_example;"
done
for i in `seq 0 99`
do
echo "create table user_deal_history_$i"
mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS $MYSQL_DB -e "CREATE TABLE user_deal_history_$i LIKE user_deal_history_example;"
done