| 12345678910111213141516171819202122 |
- """Remove business version schema artifacts.
- Revision ID: 20260429_9001_knowledge
- Revises: 20260427_0002
- Create Date: 2026-04-29 00:00:00.000000
- """
- from alembic import op
- revision: str = "20260429_9001_knowledge"
- down_revision: str | None = "20260427_0002"
- branch_labels = None
- depends_on = None
- def upgrade() -> None:
- op.execute("DO $$\nDECLARE\n table_record record;\nBEGIN\n FOR table_record IN\n SELECT table_name\n FROM information_schema.columns\n WHERE table_schema = current_schema()\n AND column_name = 'version'\n LOOP\n EXECUTE format('ALTER TABLE %I DROP COLUMN IF EXISTS version', table_record.table_name);\n END LOOP;\nEND $$;")
- def downgrade() -> None:
- # Business version tables and columns were intentionally removed.
- pass
|