diff options
author | Li Ma <skywalker.nick@gmail.com> | 2014-08-03 01:36:30 -0700 |
---|---|---|
committer | Li Ma <skywalker.nick@gmail.com> | 2014-11-16 06:55:07 -0800 |
commit | d9c55d2759d6d37be9bbfbb8776bc1a8f9611322 (patch) | |
tree | 0acea806bc91ab16025444d985575d459d6a1e61 /trove/db | |
parent | 18001e00055a8a4b282c1ced892989152409319b (diff) | |
download | trove-d9c55d2759d6d37be9bbfbb8776bc1a8f9611322.tar.gz |
Increase instances.task_description column size
The instances.task_description column size is too small to use.
This fix increases it to 255.
The migration is totally safe and the downgrade operation
is not needed.
Change-Id: I658e0dea3d304409085162ec4a2b79f8473a71c4
Closes-Bug: #1334795
Diffstat (limited to 'trove/db')
-rw-r--r-- | trove/db/sqlalchemy/migrate_repo/versions/034_change_task_description.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/trove/db/sqlalchemy/migrate_repo/versions/034_change_task_description.py b/trove/db/sqlalchemy/migrate_repo/versions/034_change_task_description.py new file mode 100644 index 00000000..e96e9d85 --- /dev/null +++ b/trove/db/sqlalchemy/migrate_repo/versions/034_change_task_description.py @@ -0,0 +1,29 @@ +# Copyright 2014 AWCloud +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +from sqlalchemy.schema import MetaData + +from trove.db.sqlalchemy.migrate_repo.schema import String +from trove.db.sqlalchemy.migrate_repo.schema import Table + + +def upgrade(migrate_engine): + meta = MetaData() + meta.bind = migrate_engine + instances = Table('instances', meta, autoload=True) + instances.c.task_description.alter(type=String(255)) + + +def downgrade(migrate_engine): + pass |