Merge "Make request_spec.spec MediumText"
This commit is contained in:
commit
2203ffd44f
nova/db/sqlalchemy
25
nova/db/sqlalchemy/api_migrations/migrate_repo/versions/052_request_specs_spec_mediumtext.py
Normal file
25
nova/db/sqlalchemy/api_migrations/migrate_repo/versions/052_request_specs_spec_mediumtext.py
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# 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 import MetaData
|
||||||
|
from sqlalchemy import Table
|
||||||
|
|
||||||
|
from nova.db.sqlalchemy import api_models
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade(migrate_engine):
|
||||||
|
meta = MetaData()
|
||||||
|
meta.bind = migrate_engine
|
||||||
|
|
||||||
|
request_specs = Table('request_specs', meta, autoload=True)
|
||||||
|
if request_specs.c.spec.type != api_models.MediumText():
|
||||||
|
request_specs.c.spec.alter(type=api_models.MediumText())
|
@ -168,7 +168,7 @@ class RequestSpec(API_BASE):
|
|||||||
|
|
||||||
id = Column(Integer, primary_key=True)
|
id = Column(Integer, primary_key=True)
|
||||||
instance_uuid = Column(String(36), nullable=False)
|
instance_uuid = Column(String(36), nullable=False)
|
||||||
spec = Column(Text, nullable=False)
|
spec = Column(MediumText(), nullable=False)
|
||||||
|
|
||||||
|
|
||||||
class Flavors(API_BASE):
|
class Flavors(API_BASE):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user