Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \

COPY ./backend/scripts /app/backend/scripts

COPY ./backend/pyproject.toml ./backend/alembic.ini /app/backend/
COPY ./backend/pyproject.toml /app/backend/

COPY ./backend/app /app/backend/app

Expand Down
71 changes: 0 additions & 71 deletions backend/alembic.ini

This file was deleted.

16 changes: 3 additions & 13 deletions backend/app/alembic/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
# access to the values within the .ini file in use.
config = context.config

# Interpret the config file for Python logging.
# This line sets up loggers basically.
assert config.config_file_name is not None
fileConfig(config.config_file_name)

# add your model's MetaData object here
# for 'autogenerate' support
# from myapp import mymodel
Expand All @@ -29,9 +24,7 @@
# my_important_option = config.get_main_option("my_important_option")
# ... etc.


def get_url():
return str(settings.DATABASE_URL)
config.set_main_option("sqlalchemy.url", str(settings.DATABASE_URL))


def run_migrations_offline():
Expand All @@ -46,7 +39,7 @@ def run_migrations_offline():
script output.

"""
url = get_url()
url = config.get_main_option("sqlalchemy.url")
context.configure(
url=url, target_metadata=target_metadata, literal_binds=True, compare_type=True
)
Expand All @@ -62,11 +55,8 @@ def run_migrations_online():
and associate a connection with the context.

"""
configuration = config.get_section(config.config_ini_section)
assert configuration is not None
configuration["sqlalchemy.url"] = get_url()
connectable = engine_from_config(
configuration,
config.get_section(config.config_ini_section, {}),
prefix="sqlalchemy.",
poolclass=pool.NullPool,
)
Expand Down
5 changes: 4 additions & 1 deletion backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies = [
"pydantic>2.0",
"emails>=1.1.2,<2.0",
"jinja2<4.0.0,>=3.1.4",
"alembic<2.0.0,>=1.12.1",
"alembic<2.0.0,>=1.16.1",
"httpx<1.0.0,>=0.25.1",
"psycopg[binary]>=3.3.4,<4.0.0",
"sqlmodel>=0.0.39,<1.0.0",
Expand Down Expand Up @@ -80,3 +80,6 @@ error-on-warning = true

[tool.fastapi]
entrypoint = "app.main:app"

[tool.alembic]
script_location = "%(here)s/app/alembic"
10 changes: 1 addition & 9 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading