Hi all,
I used alembic to generate (auto) a migration which added a table to my
postgresql DB which had a foreign key constraint matching two columns in
the new table to two columns in an existing one. The two columns in the
existing table where a joint primary key (hence unique). The
On 10/29/15 4:26 PM, Gastón Avila wrote:
> Hi all,
>
> I used alembic to generate (auto) a migration which added a table to my
> postgresql DB which had a foreign key constraint matching two columns in
> the new table to two columns in an existing one. The two columns in the
> existing table
Thanks for pointing me in the right direction @zzzeek. For me it worked
really well to just add these lines to *alembic.autogenerate.render*:
@renderers.dispatch_for(ops.ExecuteSQLOp)
def _execute_sql(autogen_context, op):
assert isinstance(op.sqltext, str)
return