Skip to content

Commit 77eae78

Browse files
committed
[fix]: postgresql migrations apply
Sorry, I was too quick to open the previous PR without checking everything even locally. Instead of `PASS`, it should have been `RETURN`, but also the DB type on my environment is in the `db.obj` attribute. Now my `fix` seems work.
1 parent c80621f commit 77eae78

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pypi_server/db/migrator/migrations/005_packagefile_basename_unique.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
@migration(8)
88
def add_uniquie_basename_index(migrator, db):
9-
# Index already exists from previous migrations
10-
if isinstance(db, PostgresqlDatabase):
11-
pass
9+
if isinstance(db.obj, PostgresqlDatabase):
10+
# Index already exists from previous migrations
11+
return
1212
try:
1313
migrate(
1414
migrator.add_index('packagefile', ('basename',), True)

0 commit comments

Comments
 (0)