summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-15 20:21:53 +0000
committerGerrit Code Review <review@openstack.org>2017-06-15 20:21:53 +0000
commit7c34b9a00522d4dd98ce9dc0a25b6d377d0673e2 (patch)
treea89fbcdf0d53775bfbaedc9d634a6e715b01122b
parent3e1ffeeaaaeed5f076c0807f277ad2f9623be3d8 (diff)
parent78f69001d82dc51fa2ac6903bc3a71f86ff189bc (diff)
Merge "Increase the Environment variable column length"
-rw-r--r--mistral/db/sqlalchemy/migration/alembic_migrations/versions/021_increase_env_columns_size.py35
-rw-r--r--mistral/db/v2/sqlalchemy/models.py2
2 files changed, 36 insertions, 1 deletions
diff --git a/mistral/db/sqlalchemy/migration/alembic_migrations/versions/021_increase_env_columns_size.py b/mistral/db/sqlalchemy/migration/alembic_migrations/versions/021_increase_env_columns_size.py
new file mode 100644
index 0000000..52a8a6e
--- /dev/null
+++ b/mistral/db/sqlalchemy/migration/alembic_migrations/versions/021_increase_env_columns_size.py
@@ -0,0 +1,35 @@
1# Copyright 2015 OpenStack Foundation.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain 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,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12# implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16"""Increase environments_v2 column size from JsonDictType to JsonLongDictType
17
18Revision ID: 021
19Revises: 020
20Create Date: 2017-06-13 13:29:41.636094
21
22"""
23
24# revision identifiers, used by Alembic.
25revision = '021'
26down_revision = '020'
27
28from alembic import op
29from mistral.db.sqlalchemy import types as st
30
31
32def upgrade():
33 # Changing column types from JsonDictType to JsonLongDictType
34 op.alter_column('environments_v2', 'variables',
35 type_=st.JsonLongDictType())
diff --git a/mistral/db/v2/sqlalchemy/models.py b/mistral/db/v2/sqlalchemy/models.py
index 323a53b..ea91435 100644
--- a/mistral/db/v2/sqlalchemy/models.py
+++ b/mistral/db/v2/sqlalchemy/models.py
@@ -367,7 +367,7 @@ class Environment(mb.MistralSecureModelBase):
367 id = mb.id_column() 367 id = mb.id_column()
368 name = sa.Column(sa.String(200)) 368 name = sa.Column(sa.String(200))
369 description = sa.Column(sa.Text()) 369 description = sa.Column(sa.Text())
370 variables = sa.Column(st.JsonDictType()) 370 variables = sa.Column(st.JsonLongDictType())
371 371
372 372
373class CronTrigger(mb.MistralSecureModelBase): 373class CronTrigger(mb.MistralSecureModelBase):