forked from mozilla/bedrock
-
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
Fred Wenzel
committed
Jan 7, 2011
1 parent
eafc1be
commit 5527311
Showing
6 changed files
with
38 additions
and
2 deletions.
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
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 @@ | ||
-- Example database migration for schematic. Remove this, if you like. |
Empty file.
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,30 @@ | ||
import sys | ||
import os | ||
|
||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | ||
|
||
# Set up playdoh. | ||
import manage | ||
from django.conf import settings | ||
|
||
config = settings.DATABASES['default'] | ||
config['HOST'] = config.get('HOST', 'localhost') | ||
config['PORT'] = config.get('PORT', '3306') | ||
|
||
if not config['HOST'] or config['HOST'].endswith('.sock'): | ||
"""Oh, you meant 'localhost'!""" | ||
config['HOST'] = 'localhost' | ||
|
||
s = 'mysql --silent {NAME} -h{HOST} -u{USER}' | ||
|
||
if config['PASSWORD']: | ||
s += ' -p{PASSWORD}' | ||
else: | ||
del config['PASSWORD'] | ||
if config['PORT']: | ||
s += ' -P{PORT}' | ||
else: | ||
del config['PORT'] | ||
|
||
db = s.format(**config) | ||
table = 'schema_version' |
Submodule vendor
updated
3 files
+3 −0 | .gitmodules | |
+1 −0 | src/schematic | |
+1 −0 | vendor.pth |