Skip to content
Merged
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
4 changes: 3 additions & 1 deletion backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,11 @@ $ docker compose exec backend bash
* After changing a model (for example, adding a column), inside the container, create a revision, e.g.:

```console
$ alembic revision --autogenerate -m "Add column last_name to User model"
$ alembic revision --autogenerate -m "Add column last_name to User model" --rev-id 040
```

* The rev-id should always be the latest existing revision ID plus 1.

* Commit to the git repository the files generated in the alembic directory.

* After creating the revision, run the migration in the database (this is what will actually change the database):
Expand Down
1 change: 1 addition & 0 deletions backend/alembic.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# path to migration scripts
script_location = app/alembic


# template used to generate migration files
# file_template = %%(rev)s_%%(slug)s

Expand Down
198 changes: 0 additions & 198 deletions backend/app/alembic/migrate_api_key.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Initialize models

Revision ID: e2412789c190
Revision ID: 001
Revises:
Create Date: 2023-11-24 22:55:43.195942

Expand All @@ -10,7 +10,7 @@
from alembic import op

# revision identifiers, used by Alembic.
revision = "e2412789c190"
revision = "001"
down_revision = None
branch_labels = None
depends_on = None
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Add max length for string(varchar) fields in User and Items models

Revision ID: 9c0a54914c78
Revises: e2412789c190
Revision ID: 002
Revises: 001
Create Date: 2024-06-17 14:42:44.639457

"""
Expand All @@ -11,8 +11,8 @@


# revision identifiers, used by Alembic.
revision = "9c0a54914c78"
down_revision = "e2412789c190"
revision = "002"
down_revision = "001"
branch_labels = None
depends_on = None

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Edit replace id integers in all models to use UUID instead

Revision ID: d98dd8ec85a3
Revises: 9c0a54914c78
Revision ID: 003
Revises: 002
Create Date: 2024-07-19 04:08:04.000976

"""
Expand All @@ -12,8 +12,8 @@


# revision identifiers, used by Alembic.
revision = "d98dd8ec85a3"
down_revision = "9c0a54914c78"
revision = "003"
down_revision = "002"
branch_labels = None
depends_on = None

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Add cascade delete relationships

Revision ID: 1a31ce608336
Revises: d98dd8ec85a3
Revision ID: 004
Revises: 003
Create Date: 2024-07-31 22:24:34.447891

"""
Expand All @@ -11,8 +11,8 @@


# revision identifiers, used by Alembic.
revision = "1a31ce608336"
down_revision = "d98dd8ec85a3"
revision = "004"
down_revision = "003"
branch_labels = None
depends_on = None

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""add organization project setup

Revision ID: 99f4fc325617
Revises: 1a31ce608336
Revision ID: 005
Revises: 004
Create Date: 2025-03-21 20:51:00.759926

"""
Expand All @@ -11,8 +11,8 @@


# revision identifiers, used by Alembic.
revision = "99f4fc325617"
down_revision = "1a31ce608336"
revision = "005"
down_revision = "004"
branch_labels = None
depends_on = None

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""add api key table

Revision ID: 0f205e3779ee
Revises: 99f4fc325617
Revision ID: 006
Revises: 005
Create Date: 2025-03-21 23:43:34.181704

"""
Expand All @@ -11,8 +11,8 @@


# revision identifiers, used by Alembic.
revision = "0f205e3779ee"
down_revision = "99f4fc325617"
revision = "006"
down_revision = "005"
branch_labels = None
depends_on = None

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Add document tables

Revision ID: c43313eca57d
Revises: 0f205e3779ee
Revision ID: 007
Revises: 006
Create Date: 2025-04-07 10:04:10.414165

"""
Expand All @@ -11,8 +11,8 @@


# revision identifiers, used by Alembic.
revision = "c43313eca57d"
down_revision = "0f205e3779ee"
revision = "007"
down_revision = "006"
branch_labels = None
depends_on = None

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""item table drop

Revision ID: 8d7a05fd0ad4
Revises: c43313eca57d
Revision ID: 008
Revises: 007
Create Date: 2025-04-08 15:26:46.613516

"""
Expand All @@ -11,8 +11,8 @@


# revision identifiers, used by Alembic.
revision = "8d7a05fd0ad4"
down_revision = "c43313eca57d"
revision = "008"
down_revision = "007"
branch_labels = None
depends_on = None

Expand Down
Loading