[asterisk-bugs] [JIRA] (ASTERISK-26260) Alembic doesn't create extensions. Python error
Marco Nicoloso (JIRA)
noreply at issues.asterisk.org
Tue Aug 2 09:32:56 CDT 2016
Marco Nicoloso created ASTERISK-26260:
-----------------------------------------
Summary: Alembic doesn't create extensions. Python error
Key: ASTERISK-26260
URL: https://issues.asterisk.org/jira/browse/ASTERISK-26260
Project: Asterisk
Issue Type: Bug
Security Level: None
Affects Versions: 13.8.2
Environment: CentOS 6.5 x64
Reporter: Marco Nicoloso
Backtrace of the commnd is provided, but PLEASE, write in the documentation entire SQL scripts to get PJSIP working.
alembic -c config.ini upgrade head
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running upgrade -> 4da0c5f79a9c, Create tables
INFO [alembic.runtime.migration] Running upgrade 4da0c5f79a9c -> 43956d550a44, Add tables for pjsip
INFO [alembic.runtime.migration] Running upgrade 43956d550a44 -> 581a4264e537, adding extensions
Traceback (most recent call last):
File "/usr/bin/alembic", line 9, in <module>
load_entry_point('alembic==0.8.7', 'console_scripts', 'alembic')()
File "/usr/lib/python2.6/site-packages/alembic-0.8.7-py2.6.egg/alembic/config.py", line 479, in main
CommandLine(prog=prog).main(argv=argv)
File "/usr/lib/python2.6/site-packages/alembic-0.8.7-py2.6.egg/alembic/config.py", line 473, in main
self.run_cmd(cfg, options)
File "/usr/lib/python2.6/site-packages/alembic-0.8.7-py2.6.egg/alembic/config.py", line 456, in run_cmd
**dict((k, getattr(options, k)) for k in kwarg)
File "/usr/lib/python2.6/site-packages/alembic-0.8.7-py2.6.egg/alembic/command.py", line 174, in upgrade
script.run_env()
File "/usr/lib/python2.6/site-packages/alembic-0.8.7-py2.6.egg/alembic/script/base.py", line 407, in run_env
util.load_python_file(self.dir, 'env.py')
File "/usr/lib/python2.6/site-packages/alembic-0.8.7-py2.6.egg/alembic/util/pyfiles.py", line 93, in load_python_file
module = load_module_py(module_id, path)
File "/usr/lib/python2.6/site-packages/alembic-0.8.7-py2.6.egg/alembic/util/compat.py", line 79, in load_module_py
mod = imp.load_source(module_id, path, fp)
File "config/env.py", line 74, in <module>
run_migrations_online()
File "config/env.py", line 67, in run_migrations_online
context.run_migrations()
File "<string>", line 8, in run_migrations
File "/usr/lib/python2.6/site-packages/alembic-0.8.7-py2.6.egg/alembic/runtime/environment.py", line 797, in run_migrations
self.get_context().run_migrations(**kw)
File "/usr/lib/python2.6/site-packages/alembic-0.8.7-py2.6.egg/alembic/runtime/migration.py", line 312, in run_migrations
step.migration_fn(**kw)
File "/usr/local/src/asterisk-certified-13.8-cert1/contrib/ast-db-manage/config/versions/581a4264e537_adding_extensions.py", line 45, in upgrade
sa.Column('appdata', sa.String(256), nullable=False),
File "<string>", line 8, in create_table
File "<string>", line 3, in create_table
File "/usr/lib/python2.6/site-packages/alembic-0.8.7-py2.6.egg/alembic/operations/ops.py", line 1098, in create_table
return operations.invoke(op)
File "/usr/lib/python2.6/site-packages/alembic-0.8.7-py2.6.egg/alembic/operations/base.py", line 318, in invoke
return fn(self, operation)
File "/usr/lib/python2.6/site-packages/alembic-0.8.7-py2.6.egg/alembic/operations/toimpl.py", line 101, in create_table
operations.impl.create_table(table)
File "/usr/lib/python2.6/site-packages/alembic-0.8.7-py2.6.egg/alembic/ddl/impl.py", line 194, in create_table
self._exec(schema.CreateTable(table))
File "/usr/lib/python2.6/site-packages/alembic-0.8.7-py2.6.egg/alembic/ddl/impl.py", line 118, in _exec
return conn.execute(construct, *multiparams, **params)
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-1.1.0b3-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 947, in execute
return meth(self, multiparams, params)
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-1.1.0b3-py2.6-linux-x86_64.egg/sqlalchemy/sql/ddl.py", line 68, in _execute_on_connection
return connection._execute_ddl(self, multiparams, params)
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-1.1.0b3-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 998, in _execute_ddl
if not self.schema_for_object.is_default else None)
File "<string>", line 1, in <lambda>
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-1.1.0b3-py2.6-linux-x86_64.egg/sqlalchemy/sql/elements.py", line 433, in compile
return self._compiler(dialect, bind=bind, **kw)
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-1.1.0b3-py2.6-linux-x86_64.egg/sqlalchemy/sql/ddl.py", line 26, in _compiler
return dialect.ddl_compiler(dialect, self, **kw)
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-1.1.0b3-py2.6-linux-x86_64.egg/sqlalchemy/sql/compiler.py", line 208, in __init__
self.string = self.process(self.statement, **compile_kwargs)
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-1.1.0b3-py2.6-linux-x86_64.egg/sqlalchemy/sql/compiler.py", line 231, in process
return obj._compiler_dispatch(self, **kwargs)
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-1.1.0b3-py2.6-linux-x86_64.egg/sqlalchemy/sql/visitors.py", line 81, in _compiler_dispatch
return meth(self, **kw)
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-1.1.0b3-py2.6-linux-x86_64.egg/sqlalchemy/sql/compiler.py", line 2286, in visit_create_table
and not first_pk)
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-1.1.0b3-py2.6-linux-x86_64.egg/sqlalchemy/sql/compiler.py", line 231, in process
return obj._compiler_dispatch(self, **kwargs)
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-1.1.0b3-py2.6-linux-x86_64.egg/sqlalchemy/sql/visitors.py", line 81, in _compiler_dispatch
return meth(self, **kw)
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-1.1.0b3-py2.6-linux-x86_64.egg/sqlalchemy/sql/compiler.py", line 2317, in visit_create_column
first_pk=first_pk
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-1.1.0b3-py2.6-linux-x86_64.egg/sqlalchemy/dialects/postgresql/base.py", line 1491, in get_column_specification
column is column.table._autoincrement_column and \
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-1.1.0b3-py2.6-linux-x86_64.egg/sqlalchemy/sql/schema.py", line 606, in _autoincrement_column
return self.primary_key._autoincrement_column
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-1.1.0b3-py2.6-linux-x86_64.egg/sqlalchemy/util/langhelpers.py", line 754, in __get__
obj.__dict__[self.__name__] = result = self.fget(obj)
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-1.1.0b3-py2.6-linux-x86_64.egg/sqlalchemy/sql/schema.py", line 3155, in _autoincrement_column
(col.name, autoinc.name)
sqlalchemy.exc.ArgumentError: Only one Column may be marked autoincrement=True, found both priority and id.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list