Schedule stale gallery enrichment
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
revision: str = "006_add_details_fetched_at"
|
||||
down_revision: Union[str, None] = "005_add_car_seen_sold_timestamps"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.add_column(
|
||||
"MOBILEDE_cars",
|
||||
sa.Column("details_fetched_at", sa.DateTime(timezone=True), nullable=True),
|
||||
)
|
||||
op.create_index(
|
||||
"ix_MOBILEDE_cars_details_fetched_at",
|
||||
"MOBILEDE_cars",
|
||||
["details_fetched_at"],
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_index("ix_MOBILEDE_cars_details_fetched_at", table_name="MOBILEDE_cars")
|
||||
op.drop_column("MOBILEDE_cars", "details_fetched_at")
|
||||
Reference in New Issue
Block a user