System check identified no issues (0 silenced).
Unhandled exception in thread started by <function wrapper at 0x10ba2a848>
Traceback (most recent call last):
File "/Users/delgiudices/Dev/django/django/utils/autoreload.py", line
220, in wrapper
fn(*args, **kwargs)
File
"/Users/delgiudices/Dev/django/django/core/management/commands/runserver.py",
line 111, in inner_run
self.check_migrations()
File
"/Users/delgiudices/Dev/django/django/core/management/commands/runserver.py",
line 158, in check_migrations
executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
File "/Users/delgiudices/Dev/django/django/db/migrations/executor.py",
line 19, in __init__
self.loader = MigrationLoader(self.connection)
File "/Users/delgiudices/Dev/django/django/db/migrations/loader.py",
line 47, in __init__
self.build_graph()
File "/Users/delgiudices/Dev/django/django/db/migrations/loader.py",
line 180, in build_graph
self.applied_migrations = recorder.applied_migrations()
File "/Users/delgiudices/Dev/django/django/db/migrations/recorder.py",
line 59, in applied_migrations
self.ensure_schema()
File "/Users/delgiudices/Dev/django/django/db/migrations/recorder.py",
line 53, in ensure_schema
editor.create_model(self.Migration)
File "/Users/delgiudices/Dev/django/django/db/backends/base/schema.py",
line 284, in create_model
self.execute(sql, params or None)
File "/Users/delgiudices/Dev/django/django/db/backends/base/schema.py",
line 110, in execute
cursor.execute(sql, params)
File "/Users/delgiudices/Dev/django/django/db/backends/utils.py", line
79, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "/Users/delgiudices/Dev/django/django/db/backends/utils.py", line
64, in execute
return self.cursor.execute(sql, params)
File "/Users/delgiudices/Dev/django/django/db/utils.py", line 95, in
__exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/Users/delgiudices/Dev/django/django/db/backends/utils.py", line
62, in execute
return self.cursor.execute(sql)
File "/Users/delgiudices/Dev/django/django/db/backends/mysql/base.py",
line 124, in execute
return self.cursor.execute(query, args)
File "/Users/delgiudices/Dev/.envs/python29/lib/python2.7/site-
packages/MySQLdb/cursors.py", line 205, in execute
self.errorhandler(self, exc, value)
File "/Users/delgiudices/Dev/.envs/python29/lib/python2.7/site-
packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
django.db.utils.OperationalError: (1142, "CREATE command denied to user
'someuser'@'someip' for table 'django_migrations'")
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24742>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_docs: => 0
* needs_tests: => 0
* stage: Unreviewed => Accepted
Comment:
This is a valid use case, there should be a way to support it.
This is somewhat related to #24669.
--
Ticket URL: <https://code.djangoproject.com/ticket/24742#comment:1>
Comment (by shaib):
A workaround could be to add a router that directs all models from the
"migrations" app into some sqlite database (in fact, if it works, it could
be packed up nicely as a solution).
However, indeed, such a solution flies in the face of #24699, which
essentially asks for a migration table in each db.
--
Ticket URL: <https://code.djangoproject.com/ticket/24742#comment:2>
Comment (by akulakov):
Adding a router that redirects migrations to a different db is exactly
what I did for a recent project, - it works just fine.
--
Ticket URL: <https://code.djangoproject.com/ticket/24742#comment:3>
* cc: andrei.avk@… (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/24742#comment:4>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/24742#comment:5>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/24742#comment:6>
* needs_better_patch: 0 => 1
* stage: Ready for checkin => Accepted
Comment:
Needs improvement as of Markus comment on the patch.
--
Ticket URL: <https://code.djangoproject.com/ticket/24742#comment:7>
* needs_better_patch: 1 => 0
* version: 1.8 => master
* stage: Accepted => Ready for checkin
Comment:
Patch looks good to me. FTR, I don't consider this something we should
backport, unless it's an error that didn't happen on 1.7.
PR: https://github.com/django/django/pull/4636
--
Ticket URL: <https://code.djangoproject.com/ticket/24742#comment:8>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"f61c4f490dc4c8ec6ba94ad4f40247db2425fc3e" f61c4f4]:
{{{
#!CommitTicketReference repository=""
revision="f61c4f490dc4c8ec6ba94ad4f40247db2425fc3e"
Fixed #24742 -- Made runserver.check_migrations ignore read-only databases
Thanks Luis Del Giudice for the report, and Aymeric Augustin and Markus
Holtermann for the reviews.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24742#comment:9>