chore: merge main into branch, resolve conflict in models.py
Both sets of UserProfile columns are retained: - is_complimentary (from main, migration 019_add_is_complimentary) - subscription_change_pending_tier / subscription_change_pending_date (our branch, renamed to migration 020_add_subscription_change_pending with down_revision updated to chain after 019_add_is_complimentary)
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
"""Add is_complimentary column to user_profiles
|
||||
|
||||
Revision ID: 019_add_is_complimentary
|
||||
Revises: 018_add_local_users_and_billing
|
||||
Create Date: 2026-03-07
|
||||
|
||||
"""
|
||||
|
||||
from typing import Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "019_add_is_complimentary"
|
||||
down_revision: Union[str, None] = "018_add_local_users_and_billing"
|
||||
depends_on: Union[str, None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
"""Add is_complimentary column to user_profiles."""
|
||||
op.add_column(
|
||||
"user_profiles",
|
||||
sa.Column("is_complimentary", sa.Boolean(), nullable=False, server_default="0"),
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
"""Remove is_complimentary column from user_profiles."""
|
||||
op.drop_column("user_profiles", "is_complimentary")
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
"""Add pending subscription-change columns to user_profiles
|
||||
|
||||
Revision ID: 019_add_subscription_change_pending
|
||||
Revises: 018_add_local_users_and_billing
|
||||
Revision ID: 020_add_subscription_change_pending
|
||||
Revises: 019_add_is_complimentary
|
||||
Create Date: 2026-03-07
|
||||
"""
|
||||
|
||||
@@ -10,8 +10,8 @@ from typing import Union
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
revision: str = "019_add_subscription_change_pending"
|
||||
down_revision: Union[str, None] = "018_add_local_users_and_billing"
|
||||
revision: str = "020_add_subscription_change_pending"
|
||||
down_revision: Union[str, None] = "019_add_is_complimentary"
|
||||
depends_on: Union[str, None] = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user