fix: Increase status column length to VARCHAR(30)

The status 'pending_user_approval' is 21 characters, exceeding VARCHAR(20).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Maciej Pienczyn 2026-02-01 15:53:57 +01:00
parent e733d26e36
commit 0f2a0409a0
2 changed files with 11 additions and 2 deletions

View File

@ -4211,8 +4211,8 @@ class MembershipApplication(Base):
user_id = Column(Integer, ForeignKey('users.id', ondelete='CASCADE'), nullable=False)
# Status workflow
# draft, submitted, under_review, changes_requested, approved, rejected
status = Column(String(20), nullable=False, default='draft')
# draft, submitted, under_review, pending_user_approval, changes_requested, approved, rejected
status = Column(String(30), nullable=False, default='draft')
# Dane firmy (strona 1 - Deklaracja)
company_name = Column(String(255), nullable=False)

View File

@ -0,0 +1,9 @@
-- Migration: 044_fix_status_column_length.sql
-- Date: 2026-02-01
-- Description: Increase status column length to accommodate 'pending_user_approval' (21 chars)
ALTER TABLE membership_applications
ALTER COLUMN status TYPE VARCHAR(30);
-- Grant permissions
GRANT ALL ON TABLE membership_applications TO nordabiz_app;