(.venv) ➜ tutorial $VENV/bin/alembic upgrade head
INFO [alembic.runtime.migration] Context impl MySQLImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
INFO [alembic.runtime.migration] Running upgrade -> 2bb1ba973f0b, initial table layout
INFO [alembic.runtime.migration] Running upgrade 2bb1ba973f0b -> 24ab8d11f014, add external identity tables
INFO [alembic.runtime.migration] Running upgrade 24ab8d11f014 -> 5c84d7260c5, add id/parent id to resource structure
INFO [alembic.runtime.migration] Running upgrade 5c84d7260c5 -> 46a9c4fb9560, make password hash field bigger
INFO [alembic.runtime.migration] Running upgrade 46a9c4fb9560 -> 264049f80948, create ordering column
INFO [alembic.runtime.migration] Running upgrade 264049f80948 -> 2d472fe79b95, bigger identity datatypes
Traceback (most recent call last):
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
context)
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
cursor.execute(statement, parameters)
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/mysqlclient-1.3.7-py3.5-macosx-10.11-x86_64.egg/MySQLdb/cursors.py", line 226, in execute
self.errorhandler(self, exc, value)
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/mysqlclient-1.3.7-py3.5-macosx-10.11-x86_64.egg/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorvalue
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/mysqlclient-1.3.7-py3.5-macosx-10.11-x86_64.egg/MySQLdb/cursors.py", line 217, in execute
res = self._query(query)
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/mysqlclient-1.3.7-py3.5-macosx-10.11-x86_64.egg/MySQLdb/cursors.py", line 378, in _query
rowcount = self._do_query(q)
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/mysqlclient-1.3.7-py3.5-macosx-10.11-x86_64.egg/MySQLdb/cursors.py", line 341, in _do_query
db.query(q)
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/mysqlclient-1.3.7-py3.5-macosx-10.11-x86_64.egg/MySQLdb/connections.py", line 280, in query
_mysql.connection.query(self, query)
_mysql_exceptions.DataError: (1171, 'All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/maykon/Projects/pyramid_tutorial/.venv/bin/alembic", line 9, in <module>
load_entry_point('alembic', 'console_scripts', 'alembic')()
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/alembic-0.8.6-py3.5.egg/alembic/config.py", line 479, in main
CommandLine(prog=prog).main(argv=argv)
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/alembic-0.8.6-py3.5.egg/alembic/config.py", line 473, in main
self.run_cmd(cfg, options)
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/alembic-0.8.6-py3.5.egg/alembic/config.py", line 456, in run_cmd
**dict((k, getattr(options, k)) for k in kwarg)
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/alembic-0.8.6-py3.5.egg/alembic/command.py", line 174, in upgrade
script.run_env()
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/alembic-0.8.6-py3.5.egg/alembic/script/base.py", line 397, in run_env
util.load_python_file(self.dir, 'env.py')
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/alembic-0.8.6-py3.5.egg/alembic/util/pyfiles.py", line 93, in load_python_file
module = load_module_py(module_id, path)
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/alembic-0.8.6-py3.5.egg/alembic/util/compat.py", line 68, in load_module_py
module_id, path).load_module(module_id)
File "<frozen importlib._bootstrap_external>", line 385, in _check_name_wrapper
File "<frozen importlib._bootstrap_external>", line 806, in load_module
File "<frozen importlib._bootstrap_external>", line 665, in load_module
File "<frozen importlib._bootstrap>", line 268, in _load_module_shim
File "<frozen importlib._bootstrap>", line 693, in _load
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 662, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/Users/maykon/.python-eggs/ziggurat_foundations-0.6.2-py3.5.egg-tmp/ziggurat_foundations/migrations/env.py", line 85, in <module>
run_migrations_online()
File "/Users/maykon/.python-eggs/ziggurat_foundations-0.6.2-py3.5.egg-tmp/ziggurat_foundations/migrations/env.py", line 78, in run_migrations_online
context.run_migrations()
File "<string>", line 8, in run_migrations
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/alembic-0.8.6-py3.5.egg/alembic/runtime/environment.py", line 797, in run_migrations
self.get_context().run_migrations(**kw)
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/alembic-0.8.6-py3.5.egg/alembic/runtime/migration.py", line 312, in run_migrations
step.migration_fn(**kw)
File "/Users/maykon/.python-eggs/ziggurat_foundations-0.6.2-py3.5.egg-tmp/ziggurat_foundations/migrations/versions/2d472fe79b95_bigger_identity_data.py", line 19, in upgrade
type_=sa.String(255), existing_type=sa.String(50))
File "<string>", line 8, in alter_column
File "<string>", line 3, in alter_column
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/alembic-0.8.6-py3.5.egg/alembic/operations/ops.py", line 1414, in alter_column
return operations.invoke(alt)
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/alembic-0.8.6-py3.5.egg/alembic/operations/base.py", line 318, in invoke
return fn(self, operation)
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/alembic-0.8.6-py3.5.egg/alembic/operations/toimpl.py", line 53, in alter_column
**operation.kw
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/alembic-0.8.6-py3.5.egg/alembic/ddl/mysql.py", line 67, in alter_column
else existing_autoincrement
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/alembic-0.8.6-py3.5.egg/alembic/ddl/impl.py", line 118, in _exec
return conn.execute(construct, *multiparams, **params)
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 914, in execute
return meth(self, multiparams, params)
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/sqlalchemy/sql/ddl.py", line 68, in _execute_on_connection
return connection._execute_ddl(self, multiparams, params)
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 968, in _execute_ddl
compiled
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
context)
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
exc_info
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 183, in reraise
raise value.with_traceback(tb)
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
context)
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
cursor.execute(statement, parameters)
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/mysqlclient-1.3.7-py3.5-macosx-10.11-x86_64.egg/MySQLdb/cursors.py", line 226, in execute
self.errorhandler(self, exc, value)
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/mysqlclient-1.3.7-py3.5-macosx-10.11-x86_64.egg/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorvalue
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/mysqlclient-1.3.7-py3.5-macosx-10.11-x86_64.egg/MySQLdb/cursors.py", line 217, in execute
res = self._query(query)
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/mysqlclient-1.3.7-py3.5-macosx-10.11-x86_64.egg/MySQLdb/cursors.py", line 378, in _query
rowcount = self._do_query(q)
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/mysqlclient-1.3.7-py3.5-macosx-10.11-x86_64.egg/MySQLdb/cursors.py", line 341, in _do_query
db.query(q)
File "/Users/maykon/Projects/pyramid_tutorial/.venv/lib/python3.5/site-packages/mysqlclient-1.3.7-py3.5-macosx-10.11-x86_64.egg/MySQLdb/connections.py", line 280, in query
_mysql.connection.query(self, query)
sqlalchemy.exc.DataError: (_mysql_exceptions.DataError) (1171, 'All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead') [SQL: 'ALTER TABLE external_identities MODIFY external_id VARCHAR(255) NULL']