... unless your naming_convention creates a name that get's truncated to 63 
chars by postgres ...


On Thursday, 12 February 2015 14:41:39 UTC+13, tim.mi...@leapfrog3d.com 
wrote:
>
> The problem appears to be that metadata (and tables) explicitly specify 
> the default schema.
> If I set the schema to None in my metadata it works fine.
>
>
>
> On Thursday, 12 February 2015 14:19:36 UTC+13, tim.mi...@leapfrog3d.com 
> wrote:
>>
>> Hi,
>>
>> My diff list is full of remove_fk and add_fk pairs.  For each foreign key 
>> alembic wants to:
>> - remove a foreign key one with table = <tablename> and
>> - add same foreign key with table = <schema>.<tablename> 
>>
>> The same is true for unique constraints.
>>
>> Any ideas?
>>
>> Thanks
>> Tim
>>
>> On Tuesday, 10 February 2015 14:05:27 UTC+13, Michael Bayer wrote:
>>>
>>>
>>>
>>> tim.mi...@leapfrog3d.com wrote: 
>>>
>>> > Hi all, 
>>> > 
>>> > I would like to have a post-deployment check that verifies the 
>>> sqlalchemy metadata in the code matches what is in the database. 
>>> > I was thinking that doing something like 
>>> > 
>>> > alembic revision --autogenerate --sql > changes.sql 
>>> > 
>>> > and then check changes.sql.  However, alembic tells me that "Using 
>>> --sql with --autogenerate does not make any sense", and indeed, if you hack 
>>> the code in command.py to remove the check you are blessed with tracebacks 
>>> that do not make any sense (to me anyway ;-) ). 
>>> > 
>>> > Can anyone suggest a way I might do this? 
>>>
>>> You’re actually doing something that they are starting to do in 
>>> Openstack, 
>>> so luckily I can confirm this is feasible. 
>>>
>>> You want to use the autogenerate API directly. Call upon 
>>> compare_metadata 
>>> documented at 
>>> http://alembic.readthedocs.org/en/latest/api.html#autogeneration. 
>>> Ideally, 
>>> if “diff == []”, then there’s no changes. 
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy-alembic" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy-alembic+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to