generated from MinBZK/python-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
116ef9e
commit 83511cb
Showing
3 changed files
with
41 additions
and
99 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
amt/migrations/versions/f6da4d6dd867_remove_project_table.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
"""remove project table | ||
Revision ID: f6da4d6dd867 | ||
Revises: ff46b7ecc348 | ||
Create Date: 2024-11-15 11:30:25.352543 | ||
""" | ||
|
||
from collections.abc import Sequence | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
from sqlalchemy.dialects import sqlite | ||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = "f6da4d6dd867" | ||
down_revision: str | None = "ff46b7ecc348" | ||
branch_labels: str | Sequence[str] | None = None | ||
depends_on: str | Sequence[str] | None = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_table("project") | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table( | ||
"project", | ||
sa.Column("id", sa.INTEGER(), nullable=False), | ||
sa.Column("name", sa.VARCHAR(length=255), nullable=False), | ||
sa.Column("lifecycle", sa.VARCHAR(length=32), nullable=True), | ||
sa.Column("last_edited", sa.DATETIME(), server_default=sa.text("(CURRENT_TIMESTAMP)"), nullable=False), | ||
sa.Column("system_card_json", sqlite.JSON(), nullable=True), | ||
sa.Column("deleted_at", sa.DATETIME(), nullable=True), | ||
sa.PrimaryKeyConstraint("id", name="pk_project"), | ||
) | ||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
from .algorithm import Algorithm | ||
from .project import Project | ||
from .task import Task | ||
from .user import User | ||
|
||
__all__ = ["Task", "User", "Algorithm", "Project"] | ||
__all__ = ["Task", "User", "Algorithm"] |
This file was deleted.
Oops, something went wrong.