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:
parent
e733d26e36
commit
0f2a0409a0
@ -4211,8 +4211,8 @@ class MembershipApplication(Base):
|
|||||||
user_id = Column(Integer, ForeignKey('users.id', ondelete='CASCADE'), nullable=False)
|
user_id = Column(Integer, ForeignKey('users.id', ondelete='CASCADE'), nullable=False)
|
||||||
|
|
||||||
# Status workflow
|
# Status workflow
|
||||||
# draft, submitted, under_review, changes_requested, approved, rejected
|
# draft, submitted, under_review, pending_user_approval, changes_requested, approved, rejected
|
||||||
status = Column(String(20), nullable=False, default='draft')
|
status = Column(String(30), nullable=False, default='draft')
|
||||||
|
|
||||||
# Dane firmy (strona 1 - Deklaracja)
|
# Dane firmy (strona 1 - Deklaracja)
|
||||||
company_name = Column(String(255), nullable=False)
|
company_name = Column(String(255), nullable=False)
|
||||||
|
|||||||
9
database/migrations/044_fix_status_column_length.sql
Normal file
9
database/migrations/044_fix_status_column_length.sql
Normal 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;
|
||||||
Loading…
Reference in New Issue
Block a user