Skip to content

Commit

Permalink
Merge "Execute attach_time query earlier in migration 98"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Sep 8, 2012
2 parents 8ee8a91 + 43ae413 commit c30d1c8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def upgrade(migrate_engine):
volumes_list = list(volumes.select().execute())
for v in volumes_list:
attach_time = select([volumes.c.attach_time],
volumes.c.id == v['id'])
volumes.c.id == v['id']).execute().fetchone()[0]
volumes.update().\
where(volumes.c.id == v['id']).\
values(attachtime_datetime=attach_time).execute()
Expand All @@ -59,7 +59,7 @@ def downgrade(migrate_engine):
volumes_list = list(volumes.select().execute())
for v in volumes_list:
attach_time = select([volumes.c.attach_time],
volumes.c.id == v['id'])
volumes.c.id == v['id']).execute().fetchone()[0]
volumes.update().\
where(volumes.c.id == v['id']).\
values(attachtime_string=attach_time).execute()
Expand Down

0 comments on commit c30d1c8

Please sign in to comment.