feat(order): add prepaid status - #2955
Conversation
…into feat/order-system
There was a problem hiding this comment.
The prepaid enum, REST mappings, and order/payment synchronization behavior work as intended in the targeted tests. However, the database migration introduces a blocking schema regression.
sync_order_status_enum() runs ALTER TABLE ... MODIFY status ENUM(...) DEFAULT ..., but the replacement column definition omits NOT NULL. MySQL MODIFY replaces the complete column definition, so this changes directorist_orders.status from NOT NULL to nullable. An isolated local migration test confirmed Null changed from NO to YES and a NULL status value was accepted.
Please preserve the complete status column definition, including NOT NULL and the pending default, and verify both fresh-install and existing-table upgrade paths. The migration should also confirm that existing order data remains unchanged.
Local functional validation on commit 6630660 confirmed that prepaid leaves the payment pending and a later paid transition correctly synchronizes the payment.
…into feat/order-system
…ctorist into feat/order-system
RabbiIslamRony
left a comment
There was a problem hiding this comment.
Rechecked the updated migration on commit 2cb30a0. The order status column now preserves NOT NULL with the pending default. Existing-table upgrade and fresh-install tests passed, existing rows remained unchanged, prepaid values were accepted, and NULL values were rejected. The prepaid-to-paid order and payment synchronization flow also passed. Approved.
PR Type
What kind of change does this PR introduce?
Description
How to reproduce the issue or how to test the changes
Directorist\Enums\Order\Status::all()includesprepaid.directorist_orders.statusenum is synced with the new status.prepaidand confirm payment records are not updated to an unsupported payment status.This PR adds a
prepaidorder status for collected-but-not-yet-renewed payment flows and keeps payment status syncing limited to valid payment statuses.Any linked issues
Fixes #
Checklist