1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00

чиним билд114

This commit is contained in:
MoonTestUse1
2025-01-02 01:15:03 +06:00
parent 2c3d722f57
commit 660cbfeedb
5 changed files with 17 additions and 10 deletions

View File

@@ -10,7 +10,8 @@ from pathlib import Path
sys.path.append(str(Path(__file__).resolve().parents[1]))
# Import your models
from app.schemas import tables
from app.models.employee import Employee
from app.models.request import Request
from app.database import Base
# this is the Alembic Config object
@@ -23,7 +24,7 @@ if config.config_file_name is not None:
target_metadata = Base.metadata
def get_url():
return os.getenv("DATABASE_URL", "postgresql://support_user:support_password@localhost:5432/support_db")
return os.getenv("DATABASE_URL", "postgresql://postgres:postgres123@postgres:5432/support_db")
def run_migrations_offline() -> None:
url = get_url()
@@ -49,7 +50,8 @@ def run_migrations_online() -> None:
with connectable.connect() as connection:
context.configure(
connection=connection,
target_metadata=target_metadata
target_metadata=target_metadata,
compare_type=True
)
with context.begin_transaction():