update pos consumer module

This commit is contained in:
2026-03-29 18:06:41 +03:30
parent 63fa2bc67e
commit c870a43e35
53 changed files with 2145 additions and 671 deletions
@@ -0,0 +1,26 @@
/*
Warnings:
- You are about to drop the column `complex_id` on the `customers` table. All the data in the column will be lost.
- You are about to drop the column `complex_id` on the `sales_invoices` table. All the data in the column will be lost.
- Added the required column `pos_id` to the `sales_invoices` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE `customers` DROP COLUMN `complex_id`;
-- AlterTable
ALTER TABLE `sales_invoices` DROP COLUMN `complex_id`,
ADD COLUMN `pos_id` VARCHAR(191) NOT NULL;
-- AddForeignKey
ALTER TABLE `customer_individuals` ADD CONSTRAINT `customer_individuals_complex_id_fkey` FOREIGN KEY (`complex_id`) REFERENCES `complexes`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE `customer_legal` ADD CONSTRAINT `customer_legal_complex_id_fkey` FOREIGN KEY (`complex_id`) REFERENCES `complexes`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE `sales_invoices` ADD CONSTRAINT `sales_invoices_pos_id_fkey` FOREIGN KEY (`pos_id`) REFERENCES `poses`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE `sales_invoices` ADD CONSTRAINT `sales_invoices_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `consumer_accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;