#27141: makemigrations fails with PermissionDenied on django_migrations
--------------------------------------+------------------------------------
     Reporter:  sjoerdjob             |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Migrations            |                  Version:  1.10
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  1                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by sjoerdjob):

 Responding to Tim Graham his remark on the pull request:

 > Sure, you could let us know how inspectdb currently works with this
 situation. I guess it might hit that exception block. I guess if that's
 better than silently skipping such tables then that solution may not be
 ideal, or at least we'd need a new parameter to
 introspection.table_names() to skip unowned tables.

 Yes, I'm indeed hitting the exception handler there. Based on results from
 Django==1.9.7, it comes from `get_table_description` which has a `SELECT *
 FROM %s LIMIT 1`.

 So I think what would make the most sense would be to add a `try`/`except
 DatabaseError` around the part where the applied migrations are obtained,
 and then (re-)raise a `MigrationSchemaMissing` instead. The error message
 is after all correct: "\nNot checking migrations as it is not possible to
 access/create the django_migrations table.".

--
Ticket URL: <https://code.djangoproject.com/ticket/27141#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.1ccbb06e266037e95aa415e3de253bac%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to