On Thu, Sep 6, 2018 at 5:28 PM, HP3 <henddher.pedr...@gmail.com> wrote:
> Hi Mike,
>
> I bumped up to SA to v0.9.10 and alembic completed successfully adding a
> revision. IOW, I didn't have to "fudge" with neither the deadcbed_.py nor
> with the .sql (offline).
>
> However, when running either migration (online/offline), I received the same
> error as before.
>
> sqlalchemy.exc.InternalError: (InternalError) cannot drop table
> groups_history because other objects depend on it
> DETAIL: constraint folders_history_id_fkey on table folders_history depends
> on table groups_history
> constraint projects_history_id_fkey on table projects_history depends on
> table groups_history
> constraint userprofiles_history_id_fkey on table userprofiles_history
> depends on table groups_history
> HINT: Use DROP ... CASCADE to drop the dependent objects too.


how are you getting that error when you run "offline"?  do you mean
when you run the SQL script manually?

the error means that you have two DROP TABLE statements that are in
the incorrect order.   You have to order the drop_table() statements
manually for now, see
https://bitbucket.org/zzzeek/alembic/issues/146/take-topological-ordering-into-account




>
>
>
> (Even with SA 1.2.11, the migration file was nearly identical - there were
> couple of differences dealing with JSONB(astext_type=sa.Text()) and an
> autoincrement in a sequence)
>
>
> I suspect is something specific to our older model.
>
> I will try to craft a simple case that demonstrates the issue and post back.
>
> Thanks!
>
>
> --
> 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.

-- 
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