-
Notifications
You must be signed in to change notification settings - Fork 27
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
Showing
39 changed files
with
1,421 additions
and
364 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
73 changes: 73 additions & 0 deletions
73
...ore_postgres_database/migration/versions/5ad02358751a_project_and_folder_trash_columns.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,73 @@ | ||
"""project and folder trash columns | ||
Revision ID: 5ad02358751a | ||
Revises: fce5d231e16d | ||
Create Date: 2024-11-07 17:14:01.094583+00:00 | ||
""" | ||
import sqlalchemy as sa | ||
from alembic import op | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "5ad02358751a" | ||
down_revision = "fce5d231e16d" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column( | ||
"folders_v2", | ||
sa.Column( | ||
"trashed_at", | ||
sa.DateTime(timezone=True), | ||
nullable=True, | ||
comment="The date and time when the folder was marked as trashed.Null if the folder has not been trashed [default].", | ||
), | ||
) | ||
op.add_column( | ||
"folders_v2", | ||
sa.Column( | ||
"trashed_explicitly", | ||
sa.Boolean(), | ||
server_default=sa.text("false"), | ||
nullable=False, | ||
comment="Indicates whether the folder was explicitly trashed by the user (true) or inherited its trashed status from a parent (false) [default].", | ||
), | ||
) | ||
op.add_column( | ||
"projects", | ||
sa.Column( | ||
"trashed_explicitly", | ||
sa.Boolean(), | ||
server_default=sa.text("false"), | ||
nullable=False, | ||
comment="Indicates whether the project was explicitly trashed by the user (true) or inherited its trashed status from a parent (false) [default].", | ||
), | ||
) | ||
op.alter_column( | ||
"projects", | ||
"trashed_at", | ||
existing_type=postgresql.TIMESTAMP(timezone=True), | ||
comment="The date and time when the project was marked as trashed. Null if the project has not been trashed [default].", | ||
existing_nullable=True, | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column( | ||
"projects", | ||
"trashed_at", | ||
existing_type=postgresql.TIMESTAMP(timezone=True), | ||
comment=None, | ||
existing_comment="The date and time when the project was marked as trashed. Null if the project has not been trashed [default].", | ||
existing_nullable=True, | ||
) | ||
op.drop_column("projects", "trashed_explicitly") | ||
op.drop_column("folders_v2", "trashed_explicitly") | ||
op.drop_column("folders_v2", "trashed_at") | ||
# ### 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
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
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
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 +1 @@ | ||
0.44.0 | ||
0.45.0 |
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
Oops, something went wrong.