-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NAS-132072 / 25.04 / Add transfer setting to Truecloud Backup (by cre…
…atorcary) (#14882) * remove bwlimit and transfers from cloud_backup (cherry picked from commit 51b7d9a) * add transfer_setting (cherry picked from commit 4907c38) * migration (cherry picked from commit 2c533a0) * add transfer_setting_choices endpoint (cherry picked from commit 48961da) * add tests (cherry picked from commit 7fac9b2) * fix new test (cherry picked from commit d9dec14) * fix new test (cherry picked from commit ad8c2dd) * fix circular import * merge migration * add import comment --------- Co-authored-by: Logan Cary <[email protected]>
- Loading branch information
1 parent
ebe1629
commit fe8dbc2
Showing
9 changed files
with
117 additions
and
17 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
...ared/middlewared/alembic/versions/24.10/2024-11-04_20-26_cloud_backup_transfer_setting.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,36 @@ | ||
"""Remove cloud_backup bwlimit, transfers; add transfer_setting | ||
Revision ID: 8eacd2bb3e18 | ||
Revises: 92b98613c498 | ||
Create Date: 2024-11-04 20:26:07.568238+00:00 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '8eacd2bb3e18' | ||
down_revision = '92b98613c498' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table('tasks_cloud_backup', schema=None) as batch_op: | ||
batch_op.add_column(sa.Column('transfer_setting', sa.String(length=16), server_default='DEFAULT', nullable=False)) | ||
batch_op.drop_column('transfers') | ||
batch_op.drop_column('bwlimit') | ||
|
||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table('tasks_cloud_backup', schema=None) as batch_op: | ||
batch_op.add_column(sa.Column('bwlimit', sa.TEXT(), nullable=False)) | ||
batch_op.add_column(sa.Column('transfers', sa.INTEGER(), nullable=True)) | ||
batch_op.drop_column('transfer_setting') | ||
|
||
# ### end Alembic commands ### |
24 changes: 24 additions & 0 deletions
24
src/middlewared/middlewared/alembic/versions/25.04/2024-11-07_15-49_merge.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,24 @@ | ||
"""Merge | ||
Revision ID: 0ec74f350c66 | ||
Revises: 0e1cd4d5fcf0, 8eacd2bb3e18 | ||
Create Date: 2024-11-07 15:49:27.544418+00:00 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '0ec74f350c66' | ||
down_revision = ('0e1cd4d5fcf0', '8eacd2bb3e18') | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
pass | ||
|
||
|
||
def downgrade(): | ||
pass |
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