Skip to content

Commit

Permalink
Rename prefect.server.database.migrations to `prefect.server.databa…
Browse files Browse the repository at this point in the history
…se._migrations` (#16214)
  • Loading branch information
desertaxle authored Dec 4, 2024
1 parent 8635065 commit 93d59f3
Show file tree
Hide file tree
Showing 204 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/static-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
run: |
# `pyright` will exit with a non-zero status code if it finds any issues,
# so we need to explicitly ignore the exit code with `|| true`.
uv tool run --with . pyright --verifytypes prefect --ignoreexternal --outputjson > prefect-analysis.json || true
uv tool run --with-editable . pyright --verifytypes prefect --ignoreexternal --outputjson > prefect-analysis.json || true
SCORE=$(jq -r '.typeCompleteness.completenessScore' prefect-analysis.json)
echo "current_score=$SCORE" >> $GITHUB_OUTPUT
Expand All @@ -98,7 +98,7 @@ jobs:
- name: Calculate base branch score
id: calculate_base_score
run: |
uv tool run --with . pyright --verifytypes prefect --ignoreexternal --outputjson > prefect-analysis-base.json || true
uv tool run --with-editable . pyright --verifytypes prefect --ignoreexternal --outputjson > prefect-analysis-base.json || true
BASE_SCORE=$(jq -r '.typeCompleteness.completenessScore' prefect-analysis-base.json)
echo "base_score=$BASE_SCORE" >> $GITHUB_OUTPUT
Expand Down
6 changes: 3 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ include src/prefect/server/api/collections_data/views/*.json

# Migrations
include src/prefect/server/database/alembic.ini
include src/prefect/server/database/migrations/*
include src/prefect/server/database/migrations/versions/*
include src/prefect/server/database/migrations/versions/*/*
include src/prefect/server/database/_migrations/*
include src/prefect/server/database/_migrations/versions/*
include src/prefect/server/database/_migrations/versions/*/*

# SQL templates
graft src/prefect/server/database/sql
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate_sdk_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def docs_path() -> Path:

SKIPPED = [
"prefect._internal",
"prefect.server.database.migrations",
"prefect.server.database._migrations",
]


Expand Down
2 changes: 1 addition & 1 deletion src/prefect/server/database/alembic.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[alembic]
script_location = prefect:server:database:migrations
script_location = prefect:server:database:_migrations

prepend_sys_path = .
revision_environment = true
Expand Down
2 changes: 1 addition & 1 deletion src/prefect/server/database/alembic_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from sqlalchemy.exc import SAWarning

import prefect.server
import prefect.server.database

ALEMBIC_LOCK = Lock()

Expand Down
4 changes: 2 additions & 2 deletions src/prefect/server/database/orm_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1665,7 +1665,7 @@ def versions_dir(self) -> Path:
"""Directory containing migrations"""
return (
Path(prefect.server.database.__file__).parent
/ "migrations"
/ "_migrations"
/ "versions"
/ "postgresql"
)
Expand All @@ -1679,7 +1679,7 @@ def versions_dir(self) -> Path:
"""Directory containing migrations"""
return (
Path(prefect.server.database.__file__).parent
/ "migrations"
/ "_migrations"
/ "versions"
/ "sqlite"
)

0 comments on commit 93d59f3

Please sign in to comment.