[sqlalchemy-20] Use a ``TextClause`` object for the empty strings in the DB model definitions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
High
|
Rodolfo Alonso |
Bug Description
The alembic comparator between the DB models and the loaded metadata in the database, cannot compare an empty string clause with a ``TextClause``. For example:
[( 'modify_default',
None,
'
'
{ 'existing_comment': None,
DefaultCl
DefaultCl
This is happening because in the DB model definitions we are using an empty string. For example, from the error presented, the "vif_details" column definition in the "ml2_port_bindings" table is [1]. The "server_default" parameter should be a ``TextClause`` object instead.
Changed in neutron: | |
assignee: | nobody → Rodolfo Alonso (rodolfo-alonso-hernandez) |
Changed in neutron: | |
status: | New → In Progress |
tags: | added: db |
Changed in neutron: | |
importance: | Undecided → High |
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/883421 /opendev. org/openstack/ neutron/ commit/ 6fa3d8019ffd416 ad3eb90e6e9a364 d4b6e23e80
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 6fa3d8019ffd416 ad3eb90e6e9a364 d4b6e23e80
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Wed May 17 19:26:50 2023 +0200
Use ``TextClause`` to define the DB model "server_default"
The alembic comparator needs the same class to compare the
database model with the loaded SQL schema.
Closes-Bug: #2020050 a9eca70d4ca755b 4c2974346d5
Change-Id: I4feab3e55f2e38