diff --git a/lib/rucio/db/sqla/migrate_repo/script.py.mako b/lib/rucio/db/sqla/migrate_repo/script.py.mako index 9d5bc1e86f..09eb1450c0 100644 --- a/lib/rucio/db/sqla/migrate_repo/script.py.mako +++ b/lib/rucio/db/sqla/migrate_repo/script.py.mako @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright European Organization for Nuclear Research (CERN) since 2012 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,10 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -''' ${message} ''' +"""${message}""" # noqa: D400, D415 import sqlalchemy as sa - from alembic import context from alembic.op import execute @@ -26,34 +24,24 @@ down_revision = ${repr(down_revision)} def upgrade(): - ''' - Upgrade the database to this revision - ''' - + """Upgrade the database to this revision.""" schema = context.get_context().version_table_schema + '.' if context.get_context().version_table_schema else '' if context.get_context().dialect.name == 'oracle': pass - elif context.get_context().dialect.name == 'postgresql': pass - elif context.get_context().dialect.name == 'mysql': pass def downgrade(): - ''' - Downgrade the database to the previous revision - ''' - + """Downgrade the database to the previous revision.""" schema = context.get_context().version_table_schema + '.' if context.get_context().version_table_schema else '' if context.get_context().dialect.name == 'oracle': pass - elif context.get_context().dialect.name == 'postgresql': pass - elif context.get_context().dialect.name == 'mysql': pass