36 lines
773 B
Python
36 lines
773 B
Python
"""add note title
|
|
|
|
Revision ID: c9e5a1b7d3f2
|
|
Revises: b7d4f1a2c3e5
|
|
Create Date: 2026-11-01 17:45:00.000000
|
|
|
|
"""
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision: str = "c9e5a1b7d3f2"
|
|
down_revision: Union[str, Sequence[str], None] = "b7d4f1a2c3e5"
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.add_column(
|
|
"note",
|
|
sa.Column(
|
|
"title",
|
|
sa.String(length=200),
|
|
nullable=False,
|
|
server_default="Untitled",
|
|
),
|
|
)
|
|
|
|
|
|
def downgrade() -> None:
|
|
with op.batch_alter_table("note") as batch_op:
|
|
batch_op.drop_column("title")
|