Actually I didn't notice that I had an error in 114->115 in addition to
115->116 (below).

So actually I just deleted the whole database, checked out a fresh version
with hg, upgraded, upgraded the database with manage_db, and then ran the
add_defaults script for nglims.  Everything works and is fine, except I
lost all my data.  The entire nglims directory is backed up, but I don't
have any way of retrieving the data easily in the working version.  Do I
need to remake all my groups, workflows, roles, and users?  Actual analyses
were all just test cases.



original error when upgrading from 108 with the now broken version:

112 -> 113...

Migration script to update the migrate_tools.repository_path column to
point to the new location lib/tool_shed/galaxy_install/migrate.

done
113 -> 114...

Migration script to update the migrate_tools.repository_path column to
point to the new location lib/tool_shed/galaxy_install/migrate.

done
114 -> 115...
Altering password column failed
Traceback (most recent call last):
  File
"lib/galaxy/model/migrate/versions/0115_longer_user_password_field.py",
line 15, in upgrade
    user.c.password.alter(type=String(255))
  File
"/home/galaxy/bin/chapman-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/changeset/schema.py",
line 491, in alter
    return alter_column(self, *p, **k)
  File
"/home/galaxy/bin/chapman-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/changeset/schema.py",
line 136, in alter_column
    engine._run_visitor(visitorcallable, delta)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 2302,
in _run_visitor
    conn._run_visitor(visitorcallable, element, **kwargs)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 1972,
in _run_visitor
    **kwargs).traverse_single(element)
  File
"/home/galaxy/bin/chapman-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/changeset/ansisql.py",
line 53, in traverse_sing
                                                    le
    ret = super(AlterTableVisitor, self).traverse_single(elem)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/sql/visitors.py", line 106,
in traverse_single
    return meth(obj, **kw)
  File
"/home/galaxy/bin/chapman-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/changeset/databases/sqlite.py",
line 53, in visi
                                            t_column
    self.recreate_table(table,column,delta)
  File
"/home/galaxy/bin/chapman-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/changeset/databases/sqlite.py",
line 36, in recr
                                            eate_table
    self.execute()
  File
"/home/galaxy/bin/chapman-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/changeset/ansisql.py",
line 42, in execute
    return self.connection.execute(self.buffer.getvalue())
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 1449,
in execute
    params)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 1628,
in _execute_text
    statement, parameters
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 1698,
in _execute_context
    context)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py", line 1691,
in _execute_context
    context)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/engine/default.py", line
331, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (OperationalError) there is already another table or
index with this name: migration_tmp u'ALTER TABLE galaxy_user R

              ENAME TO migration_tmp' ()
done
115 -> 116...

Tables for a next generation sequencing lims tied to requests.

Traceback (most recent call last):
  File "./scripts/manage_db.py", line 65, in <module>
    main( repository=repo, url=db_url )
  File
"/home/galaxy/bin/chapman-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/shell.py",
line 207, in main
    ret = command_func(**kwargs)
  File
"/home/galaxy/bin/chapman-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/api.py",
line 186, in upgrade
    return _migrate(url, repository, version, upgrade=True, err=err, **opts)
  File "<string>", line 2, in _migrate
  File
"/home/galaxy/bin/chapman-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/util/__init__.py",
line 159, in with_
                                              engine
    return f(*a, **kw)
  File
"/home/galaxy/bin/chapman-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/api.py",
line 366, in _migrate
    schema.runchange(ver, change, changeset.step)
  File
"/home/galaxy/bin/chapman-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/schema.py",
line 91, in runchange
    change.run(self.engine, step)
  File
"/home/galaxy/bin/chapman-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/script/py.py",
line 145, in run
    script_func(engine)
  File "lib/galaxy/model/migrate/versions/0116_seq_lims.py", line 52, in
upgrade
    for table in _get_tables(metadata):
  File "lib/galaxy/model/migrate/versions/0116_seq_lims.py", line 34, in
_get_tables
    primary_key = True),
  File "build/bdist.linux-x86_64/egg/sqlalchemy/schema.py", line 305, in
__new__
sqlalchemy.exc.InvalidRequestError: Table 'sample_request_map' is already
defined for this MetaData instance.  Specify 'extend_existin

            g=True' to redefine options and columns on an existing Table
object.
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 64,
in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
ImportError: No module named apport.fileutils

Original exception was:
Traceback (most recent call last):
  File "./scripts/manage_db.py", line 65, in <module>
    main( repository=repo, url=db_url )
  File
"/home/galaxy/bin/chapman-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/shell.py",
line 207, in main
    ret = command_func(**kwargs)
  File
"/home/galaxy/bin/chapman-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/api.py",
line 186, in upgrade
    return _migrate(url, repository, version, upgrade=True, err=err, **opts)
  File "<string>", line 2, in _migrate
  File
"/home/galaxy/bin/chapman-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/util/__init__.py",
line 159, in with_
                                              engine
    return f(*a, **kw)
  File
"/home/galaxy/bin/chapman-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/api.py",
line 366, in _migrate
    schema.runchange(ver, change, changeset.step)
  File
"/home/galaxy/bin/chapman-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/schema.py",
line 91, in runchange
    change.run(self.engine, step)
  File
"/home/galaxy/bin/chapman-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/script/py.py",
line 145, in run
    script_func(engine)
  File "lib/galaxy/model/migrate/versions/0116_seq_lims.py", line 52, in
upgrade
    for table in _get_tables(metadata):
  File "lib/galaxy/model/migrate/versions/0116_seq_lims.py", line 34, in
_get_tables
    primary_key = True),
  File "build/bdist.linux-x86_64/egg/sqlalchemy/schema.py", line 305, in
__new__
sqlalchemy.exc.InvalidRequestError: Table 'sample_request_map' is already
defined for this MetaData instance.  Specify 'extend_existin

            g=True' to redefine options and columns on an existing Table
object.



On Tue, Jul 2, 2013 at 12:28 PM, Lee Katz <lsk...@gmail.com> wrote:

> Thanks!  I did hg pull -u. For the database, I downgraded to 108 and then
> upgraded again but got this error when upgrading.  Is it due to the Ubuntu
> bug?  Or something else?  Should I be sticking with a particular Hg version
> instead of the latest?
>
> $ sh manage_db.sh upgrade
> 115 -> 116...
>
>  Tables for a next generation sequencing lims tied to requests.
>
> /home/galaxy/bin/chapman-dist/eggs/SQLAlchemy-0.7.9-py2.7-linux-x86_64-ucs4.egg/sqlalchemy/dialects/sqlite/base.py:723:
> SAWarning: Did not recognize type 'BIGINT' of column 'bytes'
> Traceback (most recent call last):
>   File "./scripts/manage_db.py", line 65, in <module>
>     main( repository=repo, url=db_url )
>   File
> "/home/galaxy/bin/chapman-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/shell.py",
> line 207, in main
>     ret = command_func(**kwargs)
>   File
> "/home/galaxy/bin/chapman-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/api.py",
> line 186, in upgrade
>     return _migrate(url, repository, version, upgrade=True, err=err,
> **opts)
>   File "<string>", line 2, in _migrate
>   File
> "/home/galaxy/bin/chapman-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/util/__init__.py",
> line 159, in with_engine
>     return f(*a, **kw)
>   File
> "/home/galaxy/bin/chapman-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/api.py",
> line 366, in _migrate
>     schema.runchange(ver, change, changeset.step)
>   File
> "/home/galaxy/bin/chapman-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/schema.py",
> line 91, in runchange
>     change.run(self.engine, step)
>   File
> "/home/galaxy/bin/chapman-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/script/py.py",
> line 145, in run
>     script_func(engine)
>   File "lib/galaxy/model/migrate/versions/0116_seq_lims.py", line 52, in
> upgrade
>     for table in _get_tables(metadata):
>   File "lib/galaxy/model/migrate/versions/0116_seq_lims.py", line 34, in
> _get_tables
>     primary_key = True),
>   File "build/bdist.linux-x86_64/egg/sqlalchemy/schema.py", line 305, in
> __new__
> sqlalchemy.exc.InvalidRequestError: Table 'sample_request_map' is already
> defined for this MetaData instance.  Specify 'extend_existing=True' to
> redefine options and columns on an existing Table object.
>
>
>
> On Tue, Jul 2, 2013 at 10:59 AM, Dannon Baker <dannon.ba...@gmail.com>wrote:
>
>> On Mon, Jul 1, 2013 at 8:34 PM, Brad Chapman <chapm...@50mail.com> wrote:
>>
>>>
>>> This was a typo in the downgrade function for one of the patches. I
>>> pushed a fix so if you update from bitbucket things should work smoothly
>>> again (once we get to problem 2 below).
>>>
>>> For anyone with galaxy-dist commit privileges, here's the one liner:
>>>
>>>
>>> https://bitbucket.org/chapmanb/galaxy-central/commits/463852762a6eeadcf177312330ad1cd01053263d
>>
>>
>> Thanks Brad, added to stable branch in
>> https://bitbucket.org/galaxy/galaxy-central/commits/0a06df7da177a204c7f3800ee39e5b9fd0956d7a
>>
>>
>>
>
>
> --
> Lee Katz, Ph.D.
>



-- 
Lee Katz, Ph.D.
___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

Reply via email to