9b652a3603
- 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.
21 lines
682 B
SQL
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;
|