mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-22 12:20:16 +08:00
this alembic file
This commit is contained in:
parent
0779bac12c
commit
cc338a9d3e
@ -1,4 +1,4 @@
|
|||||||
## Generate new revision
|
## Generate new revision
|
||||||
|
|
||||||
1. Update models in `/app/database/models.py`
|
1. Update models in `/comfy/app/database/models.py`
|
||||||
2. Run `alembic revision --autogenerate -m "{your message}"`
|
2. Run `alembic revision --autogenerate -m "{your message}"`
|
||||||
|
|||||||
@ -8,7 +8,7 @@ from alembic import context
|
|||||||
config = context.config
|
config = context.config
|
||||||
|
|
||||||
|
|
||||||
from app.database.models import Base
|
from comfy.app.database.models import Base
|
||||||
target_metadata = Base.metadata
|
target_metadata = Base.metadata
|
||||||
|
|
||||||
# other values from the config, defined by the needs of env.py,
|
# other values from the config, defined by the needs of env.py,
|
||||||
|
|||||||
0
comfy/app/database/__init__.py
Normal file
0
comfy/app/database/__init__.py
Normal file
@ -1,33 +1,19 @@
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
from app.logger import log_startup_warning
|
|
||||||
from utils.install_util import get_missing_requirements_message
|
|
||||||
from comfy.cli_args import args
|
|
||||||
|
|
||||||
_DB_AVAILABLE = False
|
from ...cli_args import args
|
||||||
|
|
||||||
Session = None
|
Session = None
|
||||||
|
|
||||||
|
from alembic import command
|
||||||
|
from alembic.config import Config
|
||||||
|
from alembic.runtime.migration import MigrationContext
|
||||||
|
from alembic.script import ScriptDirectory
|
||||||
|
from sqlalchemy import create_engine
|
||||||
|
from sqlalchemy.orm import sessionmaker
|
||||||
|
|
||||||
try:
|
_DB_AVAILABLE = True
|
||||||
from alembic import command
|
|
||||||
from alembic.config import Config
|
|
||||||
from alembic.runtime.migration import MigrationContext
|
|
||||||
from alembic.script import ScriptDirectory
|
|
||||||
from sqlalchemy import create_engine
|
|
||||||
from sqlalchemy.orm import sessionmaker
|
|
||||||
|
|
||||||
_DB_AVAILABLE = True
|
|
||||||
except ImportError as e:
|
|
||||||
log_startup_warning(
|
|
||||||
f"""
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
Error importing dependencies: {e}
|
|
||||||
{get_missing_requirements_message()}
|
|
||||||
This error is happening because ComfyUI now uses a local sqlite database.
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
""".strip()
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def dependencies_available():
|
def dependencies_available():
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user