Settings linked to a second dashboard with its own tab bar and its own visual language. The admin sections are rendered in Settings now, under headings that say who they are for — You, Content, The site — and each has its own address, so People, AI models, Safety and Search are links. /admin redirects into Settings for anyone who bookmarked it. AdminPage takes a `section` prop and drops its tab row when embedded; it is loaded lazily, so it is not in a learner's download. Comments are gone: router, model, table and the half of the test file that covered them. They were a discussion thread nobody was obliged to answer, and feedback replaced them with a message addressed to whoever maintains the question. The table was empty, so nothing was lost — verified before dropping it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TqXevQJhxFrM7jJg82cgZN
37 lines
1.3 KiB
Python
37 lines
1.3 KiB
Python
"""Drop the comments table.
|
|
|
|
Comments were a discussion thread under every article and question. Nothing
|
|
read them into anyone's work, so they collected opinion nobody was obliged to
|
|
answer. Feedback replaced them: a message addressed to whoever maintains the
|
|
question, which an educator resolves, replies to, or deletes.
|
|
|
|
The table was empty when this was written, so nothing is lost. The downgrade
|
|
recreates the shape but cannot recreate rows.
|
|
|
|
Revision ID: e5f6a7b8c9d0
|
|
Revises: d4e5f6a7b8c9
|
|
"""
|
|
import sqlalchemy as sa
|
|
from alembic import op
|
|
|
|
revision = "e5f6a7b8c9d0"
|
|
down_revision = "d4e5f6a7b8c9"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.drop_table("comments")
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.create_table(
|
|
"comments",
|
|
sa.Column("id", sa.Integer(), primary_key=True, index=True),
|
|
sa.Column("article_id", sa.Integer(), sa.ForeignKey("articles.id", ondelete="CASCADE"), nullable=True),
|
|
sa.Column("question_id", sa.Integer(), sa.ForeignKey("questions.id", ondelete="CASCADE"), nullable=True),
|
|
sa.Column("user_id", sa.Integer(), sa.ForeignKey("users.id", ondelete="SET NULL"), nullable=True),
|
|
sa.Column("content", sa.Text(), nullable=False),
|
|
sa.Column("status", sa.String(), server_default="pending"),
|
|
sa.Column("created_at", sa.DateTime(), nullable=True),
|
|
)
|