fix(seed): include cancel_at_period_end in test-user subscription INSERT
Discovered during Phase 9 QA: seed_test_users.py was missing the cancel_at_period_end column in its subscriptions INSERT, but the column is NOT NULL (added in 016_add_subscription_tables.py). Result: seed crashed with NotNullViolationError before any users were created, blocking auth in fresh dev environments. Pre-existing on main; not introduced by the FlowPilot migration branch. Default value: false. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -161,8 +161,8 @@ async def main() -> None:
|
|||||||
if cfg["plan"] is not None:
|
if cfg["plan"] is not None:
|
||||||
await conn.execute(
|
await conn.execute(
|
||||||
text("""
|
text("""
|
||||||
INSERT INTO subscriptions (id, account_id, plan, status, created_at, updated_at)
|
INSERT INTO subscriptions (id, account_id, plan, status, cancel_at_period_end, created_at, updated_at)
|
||||||
VALUES (:id, :aid, :plan, 'active', :now, :now)
|
VALUES (:id, :aid, :plan, 'active', false, :now, :now)
|
||||||
"""),
|
"""),
|
||||||
{"id": uuid.uuid4(), "aid": account_id, "plan": cfg["plan"], "now": now},
|
{"id": uuid.uuid4(), "aid": account_id, "plan": cfg["plan"], "now": now},
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user