Mistake in sqlalchemy DateTime type usage

Bug #1250405 reported by Ann Taraday
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Ann Taraday

Bug Description

In migration f9263d6df56_remove_dhcp_lease there is mistake in DateTime type usage for mysql, used sa.DATETIME() instead of sa.DateTime()

   File "/opt/stack/neutron/neutron/db/migration/alembic_migrations/versions/f9263d6df56_remove_dhcp_lease.py", line 46, in downgrade
    nullable=True))
  File "<string>", line 7, in add_column
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/alembic/operations.py", line 363, in add_column
    schema=schema
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/alembic/ddl/impl.py", line 127, in add_column
    self._exec(base.AddColumn(table_name, column, schema=schema))
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/alembic/ddl/impl.py", line 76, in _exec
    conn.execute(construct, *multiparams, **params)
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1449, in execute
    params)
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1542, in _execute_ddl
    compiled
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1698, in _execute_context
    context)
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1691, in _execute_context
    context)
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 331, in do_execute
    cursor.execute(statement, parameters)
ProgrammingError: (ProgrammingError) type "datetime" does not exist
LINE 1: ALTER TABLE ipallocations ADD COLUMN expiration DATETIME
                                                        ^
 'ALTER TABLE ipallocations ADD COLUMN expiration DATETIME' {}

Changed in neutron:
assignee: nobody → Ann Kamyshnikova (akamyshnikova)
description: updated
description: updated
tags: added: db
Changed in neutron:
status: New → Confirmed
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/56015

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
Gary Kotton (garyk) wrote :
tags: added: havana-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/56015
Committed: http://github.com/openstack/neutron/commit/e2163abce55bba83f531b4a0c9286b7b329602e9
Submitter: Jenkins
Branch: master

commit e2163abce55bba83f531b4a0c9286b7b329602e9
Author: Ann Kamyshnikova <email address hidden>
Date: Tue Nov 12 15:49:43 2013 +0400

    Fix sqlalchemy DateTime type usage

    In migration f9263d6df56_remove_dhcp_lease there is mistake in
    DateTime type usage for mysql, used sa.DATETIME() instead of
    sa.DateTime()

    Closes-Bug: #1250405

    Change-Id: I41fcd3babc64e3307895a92f03c7417577fa7b1d

Changed in neutron:
status: In Progress → Fix Committed
Changed in neutron:
importance: Undecided → Medium
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.