mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-04-17 15:43:28 +02:00
finally got alembic working
This commit is contained in:
9
.gitignore
vendored
9
.gitignore
vendored
@@ -3,4 +3,11 @@ venv
|
||||
MediaManager.iml
|
||||
backend/res
|
||||
backend/res/.env
|
||||
docker-compose.yml
|
||||
docker-compose.yml
|
||||
data/*
|
||||
movie/*
|
||||
torrent/*
|
||||
tv/*
|
||||
log.txt
|
||||
res/*
|
||||
/backend/src/indexer/indexers/prowlarr.http
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path = ['', '..'] + sys.path[1:]
|
||||
|
||||
|
||||
from logging.config import fileConfig
|
||||
|
||||
from alembic import context
|
||||
@@ -7,12 +10,6 @@ from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
from sqlalchemy import engine_from_config
|
||||
from sqlalchemy import pool
|
||||
|
||||
project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
|
||||
sys.path.insert(0, project_root)
|
||||
|
||||
# SQLAlchemy Base
|
||||
from ..src.database import Base
|
||||
# All Tables
|
||||
|
||||
# this is the Alembic Config object, which provides
|
||||
# access to the values within the .ini file in use.
|
||||
@@ -27,6 +24,7 @@ if config.config_file_name is not None:
|
||||
# for 'autogenerate' support
|
||||
# from myapp import mymodel
|
||||
# target_metadata = mymodel.Base.metadata
|
||||
from backend.src.database import Base
|
||||
target_metadata = Base.metadata
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ services:
|
||||
restart: unless-stopped
|
||||
container_name: postgres
|
||||
volumes:
|
||||
- .\backend\res\postgres:/var/lib/postgresql/data
|
||||
- .\res\postgres:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_USER: MediaManager
|
||||
POSTGRES_DB: MediaManager
|
||||
@@ -19,7 +19,7 @@ services:
|
||||
- PGID=1000
|
||||
- TZ=Etc/UTC
|
||||
volumes:
|
||||
- .\backend\res\prowlarr:/config
|
||||
- .\res\prowlarr:/config
|
||||
ports:
|
||||
- "9696:9696"
|
||||
qbittorrent:
|
||||
|
||||
Reference in New Issue
Block a user