Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database: Update template to latest standards #7295 #7296

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Database: Update template to latest standards #7295
* Remove UTF-8 encoding declaration
* Adjust imports to pass Ruff"s check
* Remove excessive newlines
* Format docstrings according to PEP 257
  • Loading branch information
dchristidis committed Jan 14, 2025
commit e832131a881cbc28aa32a0a87de35b0599e8018d
18 changes: 3 additions & 15 deletions lib/rucio/db/sqla/migrate_repo/script.py.mako
Original file line number Diff line number Diff line change
@@ -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");
Expand All @@ -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

Expand All @@ -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
Loading