Some checks are pending
build-images / api (push) Waiting to run
build-images / worker-gpu (push) Waiting to run
build-images / web (push) Waiting to run
codeql / Analyze (javascript-typescript) (push) Waiting to run
codeql / Analyze (python) (push) Waiting to run
perf / API hot-path micro-smoke (budgeted) (push) Waiting to run
perf / Desktop engine crates (release build check) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (comfy-workflow-schema) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (effects-core) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (eventbus-types) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (growth-analytics) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (trends-schema) (push) Waiting to run
vision2026-ci / API phase modules (ruff + pytest) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (provider-adapter-kit) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (publishing-connectors) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (render-core) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (shot-template-schema) (push) Waiting to run
vision2026-ci / Python SDK resource tests (push) Waiting to run
vision2026-ci / Desktop engine crates (test + clippy + fmt) (push) Waiting to run
vision2026-ci / Alembic upgrade + drift check (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (caption-engine) (push) Waiting to run
Paid, hosted product at menivor.com, now retired as a company project. Fresh squashed history of the cleaned working tree (secret-scanned, no .env, no customer data, no outreach logs). Built on MoneyPrinterTurbo (MIT, harry0703) — see NOTICE.
53 lines
2.3 KiB
Python
53 lines
2.3 KiB
Python
"""anon previews
|
|
|
|
Revision ID: 698dec75c496
|
|
Revises: f3a8c2d4e6b1
|
|
Create Date: 2026-11-17 02:00:00.000000+00:00
|
|
|
|
"""
|
|
from __future__ import annotations
|
|
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision: str = '698dec75c496'
|
|
down_revision: Union[str, None] = 'f3a8c2d4e6b1'
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
# ANON-PREVIEW (2026-11-17): paste-a-link preview for a signed-out
|
|
# visitor (real hook line + a real frame, before any sign-up), cached by
|
|
# url_hash and claimable into a brand-new account right after sign-up.
|
|
# See app/domains/reel_preview and app/models/db/anon_preview.py.
|
|
op.create_table(
|
|
'anon_previews',
|
|
sa.Column('id', sa.String(length=36), nullable=False),
|
|
sa.Column('url_hash', sa.String(length=64), nullable=False),
|
|
sa.Column('url', sa.String(length=2048), nullable=False),
|
|
sa.Column('ip_hash', sa.String(length=64), server_default=sa.text("''"), nullable=False),
|
|
sa.Column('source_kind', sa.String(length=20), server_default=sa.text("''"), nullable=False),
|
|
sa.Column('preset_id', sa.String(length=40), server_default=sa.text("''"), nullable=False),
|
|
sa.Column('title', sa.String(length=300), server_default=sa.text("''"), nullable=False),
|
|
sa.Column('hook_line', sa.String(length=300), server_default=sa.text("''"), nullable=False),
|
|
sa.Column('hook_style', sa.String(length=40), server_default=sa.text("''"), nullable=False),
|
|
sa.Column('hook_source', sa.String(length=20), server_default=sa.text("''"), nullable=False),
|
|
sa.Column('frames', sa.JSON(), nullable=False),
|
|
sa.Column('content', sa.JSON(), nullable=False),
|
|
sa.Column('created_at', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=False),
|
|
sa.Column('claimed_user_id', sa.String(length=32), nullable=True),
|
|
sa.Column('claimed_at', sa.DateTime(timezone=True), nullable=True),
|
|
sa.PrimaryKeyConstraint('id'),
|
|
)
|
|
op.create_index('ix_anon_previews_url_hash', 'anon_previews', ['url_hash'], unique=False)
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.drop_index('ix_anon_previews_url_hash', table_name='anon_previews')
|
|
op.drop_table('anon_previews')
|