Skip to content

Commit

Permalink
Clean up formatting a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathangreen committed Mar 10, 2025
1 parent 94a9aa3 commit 602a726
Showing 1 changed file with 60 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@


def upgrade() -> None:
op.drop_constraint("annotations_patron_id_fkey", "annotations", type_="foreignkey")
op.drop_constraint(
"annotations_patron_id_fkey",
"annotations",
type_="foreignkey",
)
op.create_foreign_key(
"annotations_patron_id_fkey",
"annotations",
Expand All @@ -25,7 +29,11 @@ def upgrade() -> None:
["id"],
ondelete="CASCADE",
)
op.drop_constraint("credentials_patron_id_fkey", "credentials", type_="foreignkey")
op.drop_constraint(
"credentials_patron_id_fkey",
"credentials",
type_="foreignkey",
)
op.create_foreign_key(
"credentials_patron_id_fkey",
"credentials",
Expand All @@ -34,7 +42,11 @@ def upgrade() -> None:
["id"],
ondelete="CASCADE",
)
op.drop_constraint("holds_patron_id_fkey", "holds", type_="foreignkey")
op.drop_constraint(
"holds_patron_id_fkey",
"holds",
type_="foreignkey",
)
op.create_foreign_key(
"holds_patron_id_fkey",
"holds",
Expand All @@ -43,7 +55,11 @@ def upgrade() -> None:
["id"],
ondelete="CASCADE",
)
op.drop_constraint("loans_patron_id_fkey", "loans", type_="foreignkey")
op.drop_constraint(
"loans_patron_id_fkey",
"loans",
type_="foreignkey",
)
op.create_foreign_key(
"loans_patron_id_fkey",
"loans",
Expand All @@ -55,19 +71,51 @@ def upgrade() -> None:


def downgrade() -> None:
op.drop_constraint("loans_patron_id_fkey", "loans", type_="foreignkey")
op.drop_constraint(
"loans_patron_id_fkey",
"loans",
type_="foreignkey",
)
op.create_foreign_key(
"loans_patron_id_fkey", "loans", "patrons", ["patron_id"], ["id"]
"loans_patron_id_fkey",
"loans",
"patrons",
["patron_id"],
["id"],
)
op.drop_constraint(
"holds_patron_id_fkey",
"holds",
type_="foreignkey",
)
op.drop_constraint("holds_patron_id_fkey", "holds", type_="foreignkey")
op.create_foreign_key(
"holds_patron_id_fkey", "holds", "patrons", ["patron_id"], ["id"]
"holds_patron_id_fkey",
"holds",
"patrons",
["patron_id"],
["id"],
)
op.drop_constraint(
"credentials_patron_id_fkey",
"credentials",
type_="foreignkey",
)
op.drop_constraint("credentials_patron_id_fkey", "credentials", type_="foreignkey")
op.create_foreign_key(
"credentials_patron_id_fkey", "credentials", "patrons", ["patron_id"], ["id"]
"credentials_patron_id_fkey",
"credentials",
"patrons",
["patron_id"],
["id"],
)
op.drop_constraint(
"annotations_patron_id_fkey",
"annotations",
type_="foreignkey",
)
op.drop_constraint("annotations_patron_id_fkey", "annotations", type_="foreignkey")
op.create_foreign_key(
"annotations_patron_id_fkey", "annotations", "patrons", ["patron_id"], ["id"]
"annotations_patron_id_fkey",
"annotations",
"patrons",
["patron_id"],
["id"],
)

0 comments on commit 602a726

Please sign in to comment.