Migrated issue, originally created by Witold Konior
Hi,
I'm using Alembic for PostgreSQL, noted that when I put all names in models to lowercase Alembic issue "CREATE TABLE" statements without quoting table names and columns. That's good but should be configurable if we want to use quotes or not.
NOTE If any object in PostgreSQL is created with quotes it should be always referenced with quotes and is case sensitive. If object is created without quotes tables UseR is same as user.
Problem occurs when I want to add foreign key constraint,
op.create_foreign_key('some_fkey', 'schema_name.sourcetable', 'schema_name.targettable', ['id'], ['id'] )
Produced alter table have quoted names of "schema.table" which are not recognizable by PostgreSQL, after removing quotes same statement runs smoothly.
Didn't test other commands that could be possibly affected.
Proposals: 1. Create option for enforcing / drooping quotes on object names, 2. Behavior unification when names are lowercase don't put quotes.
该提问来源于开源项目:sqlalchemy/alembic