/data/cuckoo/utils/db_migration$ alembic upgrade head
INFO [alembic.migration] Context impl PostgresqlImpl.
INFO [alembic.migration] Will assume transactional DDL.
INFO [alembic.migration] Running upgrade 4b09c454108c -> f111620bb8, Add shrike and Parent ID Columns
Traceback (most recent call last):
File "/usr/local/bin/alembic", line 9, in
load_entry_point('alembic==0.7.5.post1', 'console_scripts', 'alembic')()
File "/usr/local/lib/python2.7/dist-packages/alembic/config.py", line 439, in main
CommandLine(prog=prog).main(argv=argv)
File "/usr/local/lib/python2.7/dist-packages/alembic/config.py", line 433, in main
self.run_cmd(cfg, options)
File "/usr/local/lib/python2.7/dist-packages/alembic/config.py", line 416, in run_cmd
**dict((k, getattr(options, k)) for k in kwarg)
File "/usr/local/lib/python2.7/dist-packages/alembic/command.py", line 165, in upgrade
script.run_env()
File "/usr/local/lib/python2.7/dist-packages/alembic/script.py", line 390, in run_env
util.load_python_file(self.dir, 'env.py')
File "/usr/local/lib/python2.7/dist-packages/alembic/util.py", line 243, in load_python_file
module = load_module_py(module_id, path)
File "/usr/local/lib/python2.7/dist-packages/alembic/compat.py", line 79, in load_module_py
mod = imp.load_source(module_id, path, fp)
File "./env.py", line 65, in
run_migrations_online()
File "./env.py", line 58, in run_migrations_online
context.run_migrations()
File "", line 7, in run_migrations
File "/usr/local/lib/python2.7/dist-packages/alembic/environment.py", line 742, in run_migrations
self.get_context().run_migrations(**kw)
File "/usr/local/lib/python2.7/dist-packages/alembic/migration.py", line 309, in run_migrations
step.migration_fn(*_kw)
File "/data/cuckoo/utils/db_migration/versions/add_shrike_and_parent_id_columns.py", line 250, in upgrade
_perform(upgrade=True)
File "/data/cuckoo/utils/db_migration/versions/add_shrike_and_parent_id_columns.py", line 132, in _perform
op.drop_table("tasks")
File "", line 7, in drop_table
File "/usr/local/lib/python2.7/dist-packages/alembic/operations.py", line 962, in drop_table
self._table(name, *_kw)
File "/usr/local/lib/python2.7/dist-packages/alembic/ddl/impl.py", line 190, in drop_table
self._exec(schema.DropTable(table))
File "/usr/local/lib/python2.7/dist-packages/alembic/ddl/impl.py", line 105, in _exec
return conn.execute(construct, _multiparams, *_params)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 729, in execute
return meth(self, multiparams, params)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/ddl.py", line 69, in _execute_on_connection
return connection._execute_ddl(self, multiparams, params)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 783, in _execute_ddl
compiled
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 958, in _execute_context
context)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1159, in _handle_dbapi_exception
exc_info
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 951, in _execute_context
context)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 436, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.InternalError: (InternalError) cannot drop table tasks because other objects depend on it
DETAIL: constraint errors_task_id_fkey on table errors depends on table tasks
constraint guests_task_id_fkey on table guests depends on table tasks
constraint tasks_tags_task_id_fkey on table tasks_tags depends on table tasks
HINT: Use DROP ... CASCADE to drop the dependent objects too.
'\nDROP TABLE tasks' {}