1bb206a608
- Added bank account relation to PurchaseReceiptPayments model. - Updated BankAccount model to include purchaseReceiptPayments relation. - Modified PurchaseReceiptPayments service to handle bank account data during payment creation. - Enhanced SuppliersService to order suppliers by creation date. - Updated SupplierInvoicesService to include bank account details in invoice payments and order payments by payedAt. - Added foreign key constraint for bankAccountId in PurchaseReceiptPayments table.
3 lines
220 B
SQL
3 lines
220 B
SQL
-- AddForeignKey
|
|
ALTER TABLE `Purchase_Receipt_Payments` ADD CONSTRAINT `Purchase_Receipt_Payments_bankAccountId_fkey` FOREIGN KEY (`bankAccountId`) REFERENCES `Bank_Accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|