mirror of
https://github.com/ipnet-mesh/meshcore-hub.git
synced 2026-07-05 01:11:02 +02:00
Updates
This commit is contained in:
@@ -39,7 +39,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: ["3.11", "3.12"]
|
||||
python-version: ["3.11"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -36,5 +36,5 @@ repos:
|
||||
- pydantic-settings>=2.0.0
|
||||
- sqlalchemy>=2.0.0
|
||||
- fastapi>=0.100.0
|
||||
- alembic>=1.7.0
|
||||
- types-paho-mqtt>=1.6.0
|
||||
args: ["--ignore-missing-imports"]
|
||||
|
||||
@@ -107,6 +107,7 @@ module = [
|
||||
"paho.*",
|
||||
"uvicorn.*",
|
||||
"alembic.*",
|
||||
"meshcore.*",
|
||||
]
|
||||
ignore_missing_imports = true
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ def db() -> None:
|
||||
def db_upgrade(revision: str, database_url: str | None) -> None:
|
||||
"""Upgrade database to a later version."""
|
||||
import os
|
||||
from alembic import command # type: ignore[attr-defined]
|
||||
from alembic import command
|
||||
from alembic.config import Config
|
||||
|
||||
click.echo(f"Upgrading database to revision: {revision}")
|
||||
@@ -101,7 +101,7 @@ def db_upgrade(revision: str, database_url: str | None) -> None:
|
||||
def db_downgrade(revision: str, database_url: str | None) -> None:
|
||||
"""Revert database to a previous version."""
|
||||
import os
|
||||
from alembic import command # type: ignore[attr-defined]
|
||||
from alembic import command
|
||||
from alembic.config import Config
|
||||
|
||||
click.echo(f"Downgrading database to revision: {revision}")
|
||||
@@ -130,7 +130,7 @@ def db_downgrade(revision: str, database_url: str | None) -> None:
|
||||
)
|
||||
def db_revision(message: str, autogenerate: bool) -> None:
|
||||
"""Create a new database migration."""
|
||||
from alembic import command # type: ignore[attr-defined]
|
||||
from alembic import command
|
||||
from alembic.config import Config
|
||||
|
||||
click.echo(f"Creating new revision: {message}")
|
||||
@@ -151,7 +151,7 @@ def db_revision(message: str, autogenerate: bool) -> None:
|
||||
def db_current(database_url: str | None) -> None:
|
||||
"""Show current database revision."""
|
||||
import os
|
||||
from alembic import command # type: ignore[attr-defined]
|
||||
from alembic import command
|
||||
from alembic.config import Config
|
||||
|
||||
alembic_cfg = Config("alembic.ini")
|
||||
@@ -164,7 +164,7 @@ def db_current(database_url: str | None) -> None:
|
||||
@db.command("history")
|
||||
def db_history() -> None:
|
||||
"""Show database migration history."""
|
||||
from alembic import command # type: ignore[attr-defined]
|
||||
from alembic import command
|
||||
from alembic.config import Config
|
||||
|
||||
alembic_cfg = Config("alembic.ini")
|
||||
|
||||
Reference in New Issue
Block a user