add new version sql update file

Change-Id: Idc77abed4a3b298277c22b8f7a688d8fb92f9e1b
This commit is contained in:
inspurericzhang 2024-01-16 09:34:40 +00:00
parent 00d553bcc9
commit 4d673fb1fd
2 changed files with 38 additions and 1 deletions

View File

@ -24,7 +24,7 @@ import sqlalchemy as sa
# revision identifiers, used by Alembic. # revision identifiers, used by Alembic.
revision = 'a6cf98f55b4d' revision = 'a6cf98f55b4d'
down_revision = None down_revision = "a6cf98f55b4e"
branch_labels = None branch_labels = None
depends_on = None depends_on = None

View File

@ -0,0 +1,37 @@
# 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.
"""Initial revision
Revision ID: a6cf98f55b4e
Revises:
Create Date: 2024-01-16 17:07:05.546734
"""
from alembic import op
from oslo_utils import timeutils
# revision identifiers, used by Alembic.
revision = 'a6cf98f55b4e'
down_revision = None
branch_labels = None
depends_on = None
def upgrade() -> None:
sql = "INSERT INTO {} (id, value, update_time) VALUES ('{}', '{}', '{}')"
sql = sql.format('t_mo_regitster_task',
'log_max_gb',
'100',
str(timeutils.utcnow()))
op.execute(sql)