Repository navigation
fix: sql schema - #3262
fix: sql schema#3262
Conversation
…ement Implement code changes to enhance functionality and improve performance
|
| suspended_by VARCHAR(36), | ||
| CONSTRAINT fk_user_ref_deleted_by FOREIGN KEY (deleted_by) REFERENCES user (id) ON DELETE CASCADE, | ||
| CONSTRAINT fk_user_ref_suspended_by FOREIGN KEY (suspended_by) REFERENCES user (id) ON DELETE CASCADE | ||
| ); |
There was a problem hiding this comment.
Database defaults can break imports
If the target MySQL 8 database uses utf8mb4_unicode_ci, for example, user now inherits that collation while events explicitly uses utf8mb4_0900_ai_ci. MySQL rejects the foreign key from events.created_by to user.id because their collations differ, stopping the import. The previous definitions explicitly used matching collations. Keep consistent, explicit table options throughout Parts A and B so imports do not depend on database defaults.
|
|
||
| ALTER TABLE `notification` ADD COLUMN `is_read` bool DEFAULT b'0' NOT NULL; | ||
|
|
||
| ALTER TABLE `notificat |
There was a problem hiding this comment.
problem_statement.description uses TEXT, but ProblemStatementWriteSerializer accepts 20,000 characters. With utf8mb4, 20,000 four-byte characters need 80,000 bytes, exceeding the 65,535-byte limit of TEXT. The request passes validation but fails when saved. Use LONGTEXT, as this reconstruction already does for other Django text fields.
No description provided.