Get rid of DeprecationWarning during db migration
Use proper syntax to set column type, which avoids printing silly warnings and future deprecation issues. Fixes bug 854163. Change-Id: Iab1c3e7a52d739a445cf52eb9a67f61a69075026
This commit is contained in:
parent
300d4031a9
commit
c6c458e6b6
@ -71,9 +71,7 @@ def _upgrade_sqlite(t_images, t_image_members, t_image_properties):
|
||||
"""
|
||||
Upgrade 011 -> 012 with special SQLite-compatible logic.
|
||||
"""
|
||||
t_images.c.id.alter(sqlalchemy.Column("id",
|
||||
sqlalchemy.String(36),
|
||||
primary_key=True))
|
||||
t_images.c.id.alter(sqlalchemy.String(36), primary_key=True)
|
||||
|
||||
sql_commands = [
|
||||
"""CREATE TABLE image_members_backup (
|
||||
@ -121,9 +119,7 @@ def _downgrade_sqlite(t_images, t_image_members, t_image_properties):
|
||||
"""
|
||||
Downgrade 012 -> 011 with special SQLite-compatible logic.
|
||||
"""
|
||||
t_images.c.id.alter(sqlalchemy.Column("id",
|
||||
sqlalchemy.Integer(),
|
||||
primary_key=True))
|
||||
t_images.c.id.alter(sqlalchemy.Integer(), primary_key=True)
|
||||
|
||||
sql_commands = [
|
||||
"""CREATE TABLE image_members_backup (
|
||||
|
Loading…
Reference in New Issue
Block a user