~ubuntu-branches/ubuntu/saucy/heat/saucy

« back to all changes in this revision

Viewing changes to heat/db/sqlalchemy/migrate_repo/versions/023_raw_template_mysql_longtext.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Chuck Short, Adam Gandelman
  • Date: 2013-09-08 21:51:19 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20130908215119-r939tu4aumqgdrkx
Tags: 2013.2~b3-0ubuntu1
[ Chuck Short ]
* New upstream release.
* debian/control: Add python-netaddr as build-dep.
* debian/heat-common.install: Remove heat-boto and associated man-page
* debian/heat-common.install: Remove heat-cfn and associated man-page
* debian/heat-common.install: Remove heat-watch and associated man-page
* debian/patches/fix-sqlalchemy-0.8.patch: Dropped

[ Adam Gandelman ]
* debian/patches/default-kombu.patch: Dropped.
* debian/patches/default-sqlite.patch: Refreshed.
* debian/*.install, rules: Install heat.conf.sample as common
  config file in heat-common. Drop other per-package configs, they
  are no longer used.
* debian/rules: Clean pbr .egg from build dir if it exists.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# vim: tabstop=4 shiftwidth=4 softtabstop=4
 
2
 
 
3
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
 
4
#    not use this file except in compliance with the License. You may obtain
 
5
#    a copy of the License at
 
6
#
 
7
#         http://www.apache.org/licenses/LICENSE-2.0
 
8
#
 
9
#    Unless required by applicable law or agreed to in writing, software
 
10
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 
11
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 
12
#    License for the specific language governing permissions and limitations
 
13
#    under the License.
 
14
 
 
15
import sqlalchemy
 
16
from sqlalchemy.dialects import mysql
 
17
from sqlalchemy import types as sqltypes
 
18
 
 
19
 
 
20
def upgrade(migrate_engine):
 
21
    if migrate_engine.name != 'mysql':
 
22
        return
 
23
 
 
24
    meta = sqlalchemy.MetaData(bind=migrate_engine)
 
25
    raw_template = sqlalchemy.Table('raw_template', meta, autoload=True)
 
26
    raw_template.c.template.alter(type=mysql.LONGTEXT())
 
27
 
 
28
 
 
29
def downgrade(migrate_engine):
 
30
    if migrate_engine.name != 'mysql':
 
31
        return
 
32
 
 
33
    meta = sqlalchemy.MetaData(bind=migrate_engine)
 
34
    raw_template = sqlalchemy.Table('raw_template', meta, autoload=True)
 
35
    raw_template.c.template.alter(type=sqltypes.TEXT())