Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
3ae312ca
Commit
3ae312ca
authored
Nov 13, 2014
by
Ben Patterson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5954 from edx/benp/mysql56-test-updates
Don't use 'test' db for mysql since it's reserved.
parents
66ff4e67
a19b97c6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
cms/envs/bok_choy.auth.json
+1
-1
lms/envs/bok_choy.auth.json
+1
-1
scripts/reset-test-db.sh
+3
-4
No files found.
cms/envs/bok_choy.auth.json
View file @
3ae312ca
...
...
@@ -26,7 +26,7 @@
"default"
:
{
"ENGINE"
:
"django.db.backends.mysql"
,
"HOST"
:
"localhost"
,
"NAME"
:
"test"
,
"NAME"
:
"
edx
test"
,
"PASSWORD"
:
""
,
"PORT"
:
"3306"
,
"USER"
:
"root"
...
...
lms/envs/bok_choy.auth.json
View file @
3ae312ca
...
...
@@ -26,7 +26,7 @@
"default"
:
{
"ENGINE"
:
"django.db.backends.mysql"
,
"HOST"
:
"localhost"
,
"NAME"
:
"test"
,
"NAME"
:
"
edx
test"
,
"PASSWORD"
:
""
,
"PORT"
:
"3306"
,
"USER"
:
"root"
...
...
scripts/reset-test-db.sh
View file @
3ae312ca
...
...
@@ -25,8 +25,7 @@
DB_CACHE_DIR
=
"common/test/db_cache"
# Ensure the test database exists.
echo
"CREATE DATABASE IF NOT EXISTS test;"
| mysql
-u
root
echo
"GRANT ALL ON test.* TO mysql@localhost"
| mysql
-u
root
echo
"CREATE DATABASE IF NOT EXISTS edxtest;"
| mysql
-u
root
# Clear out the test database
./manage.py lms
--settings
bok_choy reset_db
--traceback
--noinput
...
...
@@ -35,7 +34,7 @@ echo "GRANT ALL ON test.* TO mysql@localhost" | mysql -u root
if
[[
-f
$DB_CACHE_DIR
/bok_choy_schema.sql
&&
-f
$DB_CACHE_DIR
/bok_choy_data.json
]]
;
then
# Load the schema, then the data (including the migration history)
mysql
-u
root
test
<
$DB_CACHE_DIR
/bok_choy_schema.sql
mysql
-u
root
edx
test <
$DB_CACHE_DIR
/bok_choy_schema.sql
./manage.py lms
--settings
bok_choy loaddata
$DB_CACHE_DIR
/bok_choy_data.json
# Re-run migrations to ensure we are up-to-date
...
...
@@ -53,6 +52,6 @@ else
# Dump the schema and data to the cache
./manage.py lms
--settings
bok_choy dumpdata
>
$DB_CACHE_DIR
/bok_choy_data.json
mysqldump
-u
root
--no-data
--skip-comments
--skip-dump-date
test
>
$DB_CACHE_DIR
/bok_choy_schema.sql
mysqldump
-u
root
--no-data
--skip-comments
--skip-dump-date
edx
test
>
$DB_CACHE_DIR
/bok_choy_schema.sql
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment