Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
steering
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
steering
Commits
85f73af7
Commit
85f73af7
authored
9 years ago
by
Christian Pointner
Browse files
Options
Downloads
Patches
Plain Diff
migrations for database nop should only be done on nop database
parent
2ec0ff18
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
nop/dbrouter.py
+5
-0
5 additions, 0 deletions
nop/dbrouter.py
nop/migrations/0001_initial.py
+2
-0
2 additions, 0 deletions
nop/migrations/0001_initial.py
pv/settings.py
+2
-0
2 additions, 0 deletions
pv/settings.py
with
9 additions
and
0 deletions
nop/dbrouter.py
0 → 100644
+
5
−
0
View file @
85f73af7
class
NopRouter
(
object
):
def
allow_migrate
(
self
,
db
,
app_label
,
model_name
=
None
,
**
hints
):
if
app_label
==
'
nop
'
:
return
db
==
'
nop
'
return
None
This diff is collapsed.
Click to expand it.
nop/migrations/0001_initial.py
+
2
−
0
View file @
85f73af7
...
@@ -6,6 +6,8 @@ from django.db import migrations, models
...
@@ -6,6 +6,8 @@ from django.db import migrations, models
class
Migration
(
migrations
.
Migration
):
class
Migration
(
migrations
.
Migration
):
app_label
=
'
nop
'
dependencies
=
[
dependencies
=
[
]
]
...
...
This diff is collapsed.
Click to expand it.
pv/settings.py
+
2
−
0
View file @
85f73af7
...
@@ -21,6 +21,8 @@ DATABASES = {
...
@@ -21,6 +21,8 @@ DATABASES = {
}
}
}
}
DATABASE_ROUTERS
=
[
'
nop.dbrouter.NopRouter
'
]
TIME_ZONE
=
'
Europe/Vienna
'
TIME_ZONE
=
'
Europe/Vienna
'
LANGUAGE_CODE
=
'
de
'
LANGUAGE_CODE
=
'
de
'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment