Created
June 17, 2011 16:00
-
-
Save cbess/1031701 to your computer and use it in GitHub Desktop.
django 1.3 postgresql schema (search path) fix for inspectdb and db connection
This file contains hidden or 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
= Modify: django.core.management.commands.inspectdb | |
- line 33, add | |
- cursor.execute("SET search_path TO myschema") | |
- line 80, change to | |
- field_type = 'ForeignKey(\'%s\'' % rel_to | |
- now you can ignore the model ordering | |
= Modify: django.db.backends.postgres_psycopg2.base | |
- line 147, add | |
- cursor.execute("SET search_path TO myschema") | |
- You may need to add the above line to lines 46 and 55, so that it happens during each execute | |
- C. Bess |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Any idea about how to fix the search path in 1.8?