Skip to content

Commit 45b6af1

Browse files
committed
Rename alembic package to migrations to avoid naming collisions with alembic package
1 parent 8309177 commit 45b6af1

14 files changed

+11
-10
lines changed

.codeclimate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ exclude_patterns:
66
- "spec/"
77
- "!spec/support/helpers"
88
- "config/"
9-
- "src/alembic/"
9+
- "src/migrations/"
1010
- "db/"
1111
- "dist/"
1212
- "features/"

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ RUN --mount=type=cache,target=~/.cache/uv \
6464
# Create the base app with the common python packages
6565
FROM base AS base_app
6666
USER nonroot
67-
COPY --chown=nonroot:nonroot src/alembic ./alembic
67+
COPY --chown=nonroot:nonroot src/migrations ./migrations
6868
COPY --chown=nonroot:nonroot src/domains ./domains
6969
COPY --chown=nonroot:nonroot src/gateways ./gateways
7070
COPY --chown=nonroot:nonroot src/common ./common

alembic.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[alembic]
44
# path to migration scripts
5-
script_location = src/alembic
5+
script_location = src/migrations
66

77
# template used to generate migration file names; The default value is %%(rev)s_%%(slug)s
88
# Uncomment the line below if you want the files to be prepended with date and time

docs/architecture.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ and the persistence layer.
1010

1111
This is a high level list of the packages in this application template:
1212

13-
* `alembic` (database migration manager)
13+
* `migrations` (database migration manager)
1414
* `dramatiq_worker` (async tasks runner)
1515
* `common` (some common boilerplate initialisation shared by all applications )
1616
* `http_app` (http presentation layer)
@@ -30,7 +30,7 @@ This is a high level representation of the nested layers in the application:
3030
```mermaid
3131
flowchart TD
3232
subgraph "Framework & Drivers + Interface Adapters"
33-
alembic
33+
migrations
3434
dramatiq_worker
3535
http_app
3636
gateways
@@ -51,7 +51,7 @@ flowchart TD
5151
end
5252
end
5353
54-
alembic ~~~ domains.books
54+
migrations ~~~ domains.books
5555
dramatiq_worker ~~~ domains.books
5656
http_app ~~~ domains.books
5757
gateways ~~~ domains.books

docs/packages/alembic.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
we implement some extra features on top of the default configuration:
55

66
* Support for both sync and async SQLAlchemy engines at the same time
7+
* Support for fixtures management
78
* Grabs the database information from the `SQLAlchemyBindManager` configuration
89
in the application, so we won't have duplicate configuration.
910
* `alembic.ini` (not technically part of the python package) is setup to

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ includes = ["src/**/*.py"]
7676
branch = true
7777
source = ["src"]
7878
omit = [
79-
"src/alembic/*",
79+
"src/migrations/*",
8080
"src/common/config.py",
8181
"src/common/logs/*",
8282
"src/dramatiq_worker/__init__.py",
@@ -94,7 +94,7 @@ exclude_also = [
9494

9595
[tool.mypy]
9696
files = ["src", "tests"]
97-
exclude = ["alembic"]
97+
exclude = ["migrations"]
9898
# Pydantic plugin causes some issues: https://github.com/pydantic/pydantic-settings/issues/403
9999
#plugins = "pydantic.mypy,strawberry.ext.mypy_plugin"
100100
plugins = "strawberry.ext.mypy_plugin"
@@ -151,4 +151,4 @@ ignore = [
151151
[tool.ruff.lint.per-file-ignores]
152152
"__init__.py" = ["F401"] # Ignore unused imports on init files
153153
"tests/**/*.py" = ["S101"] # Allow assert usage on tests
154-
"src/alembic/env.py" = ["E501"] # Allow long lines
154+
"src/migrations/env.py" = ["E501"] # Allow long lines

src/alembic.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copy of alembic.ini used to run migrations inside the container
22

33
[alembic]
4-
script_location = alembic
4+
script_location = migrations
55
prepend_sys_path = .
66
file_template = %%(year)d-%%(month).2d-%%(day).2d-%%(hour).2d%%(minute).2d%%(second).2d-%%(rev)s_%%(slug)s
77
version_path_separator = os # Use os.pathsep. Default configuration used for new projects.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)