mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-15 18:25:18 +02:00
style: format backend with ruff
This commit is contained in:
parent
b664547178
commit
9841bdda72
14 changed files with 46 additions and 32 deletions
|
|
@ -7,6 +7,7 @@ Create Date: 2026-01-06 12:00:00.000000
|
|||
"""
|
||||
|
||||
from collections.abc import Sequence
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
|
|
@ -17,6 +18,7 @@ depends_on: str | Sequence[str] | None = None
|
|||
|
||||
from sqlalchemy import text
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
connection = op.get_bind()
|
||||
constraint_exists = connection.execute(
|
||||
|
|
@ -31,9 +33,10 @@ def upgrade() -> None:
|
|||
op.drop_constraint(
|
||||
"uq_searchspace_user_connector_type",
|
||||
"search_source_connectors",
|
||||
type_="unique"
|
||||
type_="unique",
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
connection = op.get_bind()
|
||||
constraint_exists = connection.execute(
|
||||
|
|
@ -48,6 +51,5 @@ def downgrade() -> None:
|
|||
op.create_unique_constraint(
|
||||
"uq_searchspace_user_connector_type",
|
||||
"search_source_connectors",
|
||||
["search_space_id", "user_id", "connector_type"]
|
||||
["search_space_id", "user_id", "connector_type"],
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ Create Date: 2026-01-06 14:00:00.000000
|
|||
"""
|
||||
|
||||
from collections.abc import Sequence
|
||||
|
||||
from alembic import op
|
||||
|
||||
revision: str = "58"
|
||||
|
|
@ -17,6 +18,7 @@ depends_on: str | Sequence[str] | None = None
|
|||
|
||||
from sqlalchemy import text
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
connection = op.get_bind()
|
||||
constraint_exists = connection.execute(
|
||||
|
|
@ -31,9 +33,10 @@ def upgrade() -> None:
|
|||
op.create_unique_constraint(
|
||||
"uq_searchspace_user_connector_name",
|
||||
"search_source_connectors",
|
||||
["search_space_id", "user_id", "name"]
|
||||
["search_space_id", "user_id", "name"],
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
connection = op.get_bind()
|
||||
constraint_exists = connection.execute(
|
||||
|
|
@ -48,6 +51,5 @@ def downgrade() -> None:
|
|||
op.drop_constraint(
|
||||
"uq_searchspace_user_connector_name",
|
||||
"search_source_connectors",
|
||||
type_="unique"
|
||||
type_="unique",
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue