Files
psp_api/prisma/migrations/20260423232622_init/migration.sql
T
ahasani 9b652a3603 feat: Refactor accounts service and related DTOs to enhance consumer account management
- Updated AccountsService to filter out OWNER roles in findAll method.
- Removed CreateConsumerAccountDto and its role property from account creation logic.
- Enhanced BusinessActivitiesService to include complex counts in responses.
- Modified ComplexesController and ComplexesService to handle consumer-specific logic.
- Introduced CreateConsumerComplexDto and UpdateConsumerComplexDto for complex management.
- Updated PosesController and PosesService to manage POS creation and updates with consumer context.
- Added utility function to calculate remaining accounts for business activities.
- Updated Prisma migration to add account_id to poses and enforce unique constraints.
2026-04-24 04:27:28 +03:30

21 lines
682 B
SQL

/*
Warnings:
- A unique constraint covering the columns `[account_id]` on the table `poses` will be added. If there are existing duplicate values, this will fail.
*/
-- AlterTable
ALTER TABLE `licenses` MODIFY `accounts_limit` INTEGER NOT NULL DEFAULT 2;
-- AlterTable
ALTER TABLE `partners` ADD COLUMN `logo_url` VARCHAR(191) NULL;
-- AlterTable
ALTER TABLE `poses` ADD COLUMN `account_id` VARCHAR(191) NULL;
-- CreateIndex
CREATE UNIQUE INDEX `poses_account_id_key` ON `poses`(`account_id`);
-- AddForeignKey
ALTER TABLE `poses` ADD CONSTRAINT `poses_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `consumer_accounts`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;