-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
create index player_id_idx on visit_history(player_id); | ||
create index tenant_id_competition_id_idx on visit_history(tenant_id,competition_id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
|
||
set -ex | ||
cd `dirname $0` | ||
|
||
ISUCON_DB_HOST=${ISUCON_DB_HOST:-127.0.0.1} | ||
ISUCON_DB_PORT=${ISUCON_DB_PORT:-3306} | ||
ISUCON_DB_USER=${ISUCON_DB_USER:-isucon} | ||
ISUCON_DB_PASSWORD=${ISUCON_DB_PASSWORD:-isucon} | ||
ISUCON_DB_NAME=${ISUCON_DB_NAME:-isuports} | ||
|
||
# MySQLを初期化 | ||
for f in admin/10_schema.sql admin/90_data.sql init.sql admin/20_migration;do | ||
mysql -u"$ISUCON_DB_USER" \ | ||
-p"$ISUCON_DB_PASSWORD" \ | ||
--host "$ISUCON_DB_HOST" \ | ||
--port "$ISUCON_DB_PORT" \ | ||
"$ISUCON_DB_NAME" < $f | ||
done | ||
|
||
# SQLiteのデータベースを初期化 | ||
rm -f ../tenant_db/*.db | ||
cp -r ../../initial_data/*.db ../tenant_db/ |