Last active
December 6, 2016 11:51
-
-
Save davidread/af650b9227e5ed54d891dbeeb0e2c254 to your computer and use it in GitHub Desktop.
Running 'paster db init -c test-core.ini' has this error, following running the tests. For more info and the fix, see: https://github.com/ckan/ckan/issues/3354
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ckan)vagrant@precise64:/vagrant/src/ckan$ paster --plugin=ckan db init -c test-core.ini | |
Traceback (most recent call last): | |
File "/home/vagrant/ckan/bin/paster", line 11, in <module> | |
sys.exit(run()) | |
File "/home/vagrant/ckan/local/lib/python2.7/site-packages/paste/script/command.py", line 102, in run | |
invoke(command, command_name, options, args[1:]) | |
File "/home/vagrant/ckan/local/lib/python2.7/site-packages/paste/script/command.py", line 141, in invoke | |
exit_code = runner.run(args) | |
File "/home/vagrant/ckan/local/lib/python2.7/site-packages/paste/script/command.py", line 236, in run | |
result = self.command() | |
File "/vagrant/src/ckan/ckan/lib/cli.py", line 236, in command | |
model.repo.init_db() | |
File "/vagrant/src/ckan/ckan/model/__init__.py", line 188, in init_db | |
self.upgrade_db() | |
File "/vagrant/src/ckan/ckan/model/__init__.py", line 285, in upgrade_db | |
mig.upgrade(self.metadata.bind, self.migrate_repository, version=version) | |
File "/home/vagrant/ckan/local/lib/python2.7/site-packages/migrate/versioning/api.py", line 186, in upgrade | |
return _migrate(url, repository, version, upgrade=True, err=err, **opts) | |
File "<decorator-gen-16>", line 2, in _migrate | |
File "/home/vagrant/ckan/local/lib/python2.7/site-packages/migrate/versioning/util/__init__.py", line 160, in with_engine | |
return f(*a, **kw) | |
File "/home/vagrant/ckan/local/lib/python2.7/site-packages/migrate/versioning/api.py", line 366, in _migrate | |
schema.runchange(ver, change, changeset.step) | |
File "/home/vagrant/ckan/local/lib/python2.7/site-packages/migrate/versioning/schema.py", line 93, in runchange | |
change.run(self.engine, step) | |
File "/home/vagrant/ckan/local/lib/python2.7/site-packages/migrate/versioning/script/py.py", line 148, in run | |
script_func(engine) | |
File "/vagrant/src/ckan/ckan/migration/versions/002_add_author_and_maintainer.py", line 29, in upgrade | |
col.create(package) | |
File "/home/vagrant/ckan/local/lib/python2.7/site-packages/migrate/changeset/schema.py", line 571, in create | |
engine._run_visitor(visitorcallable, self, connection, **kwargs) | |
File "/home/vagrant/ckan/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1555, in _run_visitor | |
conn._run_visitor(visitorcallable, element, **kwargs) | |
File "/home/vagrant/ckan/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1202, in _run_visitor | |
**kwargs).traverse_single(element) | |
File "/home/vagrant/ckan/local/lib/python2.7/site-packages/migrate/changeset/ansisql.py", line 56, in traverse_single | |
ret = super(AlterTableVisitor, self).traverse_single(elem) | |
File "/home/vagrant/ckan/local/lib/python2.7/site-packages/sqlalchemy/sql/visitors.py", line 119, in traverse_single | |
return meth(obj, **kw) | |
File "/home/vagrant/ckan/local/lib/python2.7/site-packages/migrate/changeset/ansisql.py", line 104, in visit_column | |
self.execute() | |
File "/home/vagrant/ckan/local/lib/python2.7/site-packages/migrate/changeset/ansisql.py", line 44, in execute | |
return self.connection.execute(self.buffer.getvalue()) | |
File "/home/vagrant/ckan/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 719, in execute | |
return self._execute_text(object, multiparams, params) | |
File "/home/vagrant/ckan/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 868, in _execute_text | |
statement, parameters | |
File "/home/vagrant/ckan/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 954, in _execute_context | |
context) | |
File "/home/vagrant/ckan/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1116, in _handle_dbapi_exception | |
exc_info | |
File "/home/vagrant/ckan/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 189, in raise_from_cause | |
reraise(type(exception), exception, tb=exc_tb) | |
File "/home/vagrant/ckan/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 947, in _execute_context | |
context) | |
File "/home/vagrant/ckan/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 435, in do_execute | |
cursor.execute(statement, parameters) | |
sqlalchemy.exc.ProgrammingError: (ProgrammingError) column "author" of relation "package" already exists | |
'\nALTER TABLE package ADD author TEXT' {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note that, to recover from this you need to drop and recreate the test database: