Changed the storage SQLAlchemy model to use Text
The contents property on StoredFiles shouldn't have a length, under MySQL the String type requires a length but Text doesn't and is thus a better fit. Closes-bug: #1365848 Change-Id: Ib91cabe72026d13587d48b4451013d2b3528e96c
This commit is contained in:
parent
ea838d2980
commit
a3575e3189
@ -11,7 +11,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from sqlalchemy import Column, DateTime, Integer, MetaData, String, Table
|
||||
from sqlalchemy import Column, DateTime, Integer, MetaData, String, Table, Text
|
||||
|
||||
from tuskar.openstack.common.gettextutils import _ # noqa
|
||||
from tuskar.openstack.common import log as logging
|
||||
@ -31,7 +31,7 @@ def upgrade(migrate_engine):
|
||||
'stored_file',
|
||||
meta,
|
||||
Column('uuid', String(length=36), primary_key=True, nullable=False),
|
||||
Column('contents', String(), nullable=False),
|
||||
Column('contents', Text(), nullable=False),
|
||||
Column('object_type', String(length=20), nullable=False),
|
||||
Column('name', String(length=64), nullable=True),
|
||||
Column('version', Integer(), nullable=True),
|
||||
|
@ -225,7 +225,7 @@ class StoredFile(Base):
|
||||
uuid = Column(String(length=36), primary_key=True)
|
||||
|
||||
#: contents contains the full file contents as a string.
|
||||
contents = Column(String(), nullable=False)
|
||||
contents = Column(Text(), nullable=False)
|
||||
|
||||
#: Object type flags the type of file that this is, i.e. template or
|
||||
#: environment file.
|
||||
|
Loading…
x
Reference in New Issue
Block a user