Skip to content

Commit

Permalink
fix migration file name
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 committed Aug 29, 2024
1 parent 2a35795 commit ef43546
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions server/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,10 @@ async def _(
if await pg.fetchval(
"select count(1) from view_subject_patch where state = $1", PatchState.Pending
):
print("redirect to subject")
return Redirect(f"/?type={PatchType.Subject}")
if await pg.fetchval(
"select count(1) from view_episode_patch where state = $1", PatchState.Pending
):
print("redirect to episode")
return Redirect(f"/?type={PatchType.Episode}")
return Redirect(f"/?type={PatchType.Subject}")

Expand Down
2 changes: 1 addition & 1 deletion server/migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async def run_migration() -> None:
"alter table episode_patch add column subject_id int not null default 0;",
),
Migrate(7, fresh_view_sql),
Migrate(8, sql_dir.joinpath("006-create-index.sql").read_bytes().decode()),
Migrate(8, sql_dir.joinpath("008-create-index.sql").read_bytes().decode()),
]

if not all(x <= y for x, y in itertools.pairwise(migrations)):
Expand Down
File renamed without changes.

0 comments on commit ef43546

Please sign in to comment.