-
Notifications
You must be signed in to change notification settings - Fork 32
✨ Trash folders #6642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
pcrespov
merged 48 commits into
ITISFoundation:master
from
pcrespov:is468/trash-api-folders
Nov 8, 2024
Merged
✨ Trash folders #6642
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
5e682dd
split folders
pcrespov 9f7436b
split handlers
pcrespov ff0e622
adds trash counterpart
pcrespov 63cb1dc
trash folders API
pcrespov 23eb5a9
exception handling
pcrespov f405fb4
uses in projects and renames
pcrespov ad0576e
doc
pcrespov 49a0b64
doc
pcrespov 5804a60
updates calls
pcrespov 887c84e
rename
pcrespov 54506b3
tests
pcrespov 1d265f3
tests
pcrespov 846980c
updates app_environemnt
pcrespov 822aa88
adds trashed_at in folders
pcrespov 8f45bd1
migration
pcrespov d7cda1a
minor
pcrespov 1bc9544
connected trash in folders
pcrespov 7af3ba7
updates OAS
pcrespov b0c08a3
services/webserver api version: 0.44.0 → 0.45.0
pcrespov 33999a1
drafting tests
pcrespov 5debfb5
simplified this version of the exception handling
pcrespov d506314
new import
pcrespov 18e98c2
adapts tests
pcrespov c15a304
adds flags
pcrespov 0223319
migration
pcrespov 75dcb12
cleanup test_folders
pcrespov d929700
rm projects.trashed_explcitly. will used hidden
pcrespov 53fcf21
cleanup
pcrespov 8a518a5
updates folders
pcrespov d29d79f
patch project explicitly
pcrespov e8b482a
drafts implementation
pcrespov 69236c2
simplified implementation and tests
pcrespov 1e24c58
setup with folders and projects
pcrespov 37067b8
tests pass
pcrespov a810e7f
doc
pcrespov 9a3b4d8
fixes exception
pcrespov 42e3f58
improves error handling
pcrespov 547c349
minor
pcrespov 1706b7f
@giancarloromeo review: rm constructor
pcrespov 9c963ed
@sanderegg review: interfaces for batch/ update
pcrespov 398b09a
@GitHK review: doc
pcrespov a27412a
new cols
pcrespov 9dfad7b
@sanderegg review: rm defaults
pcrespov 5685f6f
extra project col
pcrespov 4f5407a
fixes explicits tests
pcrespov 0b3e984
fixes tests
pcrespov d993713
updates tests
pcrespov 01bf2ad
updates column fixture
pcrespov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.