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
ef75f9bb
Commit
ef75f9bb
authored
Jul 31, 2013
by
e0d
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding migrate env for cms
cleanup
parent
8573ac39
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
cms/envs/aws_migrate.py
+24
-0
No files found.
cms/envs/aws_migrate.py
0 → 100644
View file @
ef75f9bb
"""
A Django settings file for use on AWS while running
database migrations, since we don't want to normally run the
LMS with enough privileges to modify the database schema.
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
# Import everything from .aws so that our settings are based on those.
from
.aws
import
*
import
os
from
django.core.exceptions
import
ImproperlyConfigured
USER
=
os
.
environ
.
get
(
'DB_MIGRATION_USER'
,
'root'
)
PASSWORD
=
os
.
environ
.
get
(
'DB_MIGRATION_PASS'
,
None
)
if
not
PASSWORD
:
raise
ImproperlyConfigured
(
"No database password was provided for running "
"migrations. This is fatal."
)
DATABASES
[
'default'
][
'USER'
]
=
USER
DATABASES
[
'default'
][
'PASSWORD'
]
=
PASSWORD
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