-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename entry remote timestamp columns (#85)
* rename entry_url to target_url * add comments url * rename fields in code * remove obsolete helpers * more usage corrections * add logic to decide feed discoverability * fix title * fix linter * remove header * rename entry sort fields * rename fields in code usage * lint
- Loading branch information
1 parent
990d269
commit 86d9d09
Showing
10 changed files
with
107 additions
and
33 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
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
33 changes: 33 additions & 0 deletions
33
migrations/versions/4ab856aa1a08_recreate_date_sort_index.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,33 @@ | ||
"""recreate date sort index | ||
Revision ID: 4ab856aa1a08 | ||
Revises: de5bb7dd36db | ||
Create Date: 2024-01-02 14:09:58.205490 | ||
""" | ||
from typing import Sequence, Union | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = '4ab856aa1a08' | ||
down_revision: Union[str, None] = 'de5bb7dd36db' | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table('entries', schema=None) as batch_op: | ||
batch_op.create_index('entry_sort_ts', [sa.text('sort_date DESC')], unique=False) | ||
|
||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table('entries', schema=None) as batch_op: | ||
batch_op.drop_index('entry_sort_ts') | ||
|
||
# ### end Alembic commands ### |
36 changes: 36 additions & 0 deletions
36
migrations/versions/de5bb7dd36db_rename_entry_date_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,36 @@ | ||
"""rename entry date columns | ||
Revision ID: de5bb7dd36db | ||
Revises: a7680d17c088 | ||
Create Date: 2024-01-02 13:52:37.962221 | ||
""" | ||
from typing import Sequence, Union | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = 'de5bb7dd36db' | ||
down_revision: Union[str, None] = 'a7680d17c088' | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table('entries', schema=None) as batch_op: | ||
batch_op.drop_index('entry_updated_ts') | ||
batch_op.alter_column('remote_created', new_column_name='display_date') | ||
batch_op.alter_column('remote_updated', new_column_name='sort_date') | ||
|
||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table('entries', schema=None) as batch_op: | ||
batch_op.alter_column('display_date', new_column_name='remote_created') | ||
batch_op.alter_column('sort_date', new_column_name='remote_updated') | ||
|
||
# ### end Alembic commands ### |