Files
psp_api/prisma/migrations/20260211214040_init/migration.sql
T
ahasani a073af76fe feat: add config module with controller and service
- Implemented ConfigController for handling config-related requests.
- Created ConfigService for business logic related to configurations.
- Added CreateConfigDto for validating configuration data.

feat: add good categories module with controller and service

- Implemented GoodCategoriesController for managing good categories.
- Created GoodCategoriesService for business logic related to good categories.
- Added CreateGoodCategoryDto for validating good category data.

feat: add goods module with controller and service

- Implemented GoodsController for managing goods.
- Created GoodsService for business logic related to goods.
- Added CreateGoodDto for validating good data.

feat: add profile module with controller and service

- Implemented ProfileController for managing user profiles.
- Created ProfileService for business logic related to profiles.
- Added CreateProfileDto for profile data structure.

feat: add sales invoice payments module with controller and service

- Implemented SalesInvoicePaymentsController for managing invoice payments.
- Created SalesInvoicePaymentsService for business logic related to payments.
- Added CreateSalesInvoicePaymentDto for validating payment data.

feat: add service categories module with controller and service

- Implemented ServiceCategoriesController for managing service categories.
- Created ServiceCategoriesService for business logic related to service categories.
- Added CreateServiceCategoryDto for validating service category data.

feat: add services module with controller and service

- Implemented ServicesController for managing services.
- Created ServicesService for business logic related to services.
- Added CreateServiceDto for validating service data.

feat: add trigger logs module with controller and service

- Implemented TriggerLogsController for managing trigger logs.
- Created TriggerLogsService for business logic related to trigger logs.
- Added CreateTriggerLogDto for validating trigger log data.

feat: add uploaders module for handling file uploads

- Implemented UploadersController for managing file uploads.
- Created ImageUploaderService for image upload logic.
- Created UploaderService for file handling and storage.
2026-02-12 20:31:04 +03:30

88 lines
5.4 KiB
SQL

/*
Warnings:
- You are about to drop the column `createdAt` on the `service_categories` table. All the data in the column will be lost.
- You are about to drop the column `deletedAt` on the `service_categories` table. All the data in the column will be lost.
- You are about to drop the column `imageUrl` on the `service_categories` table. All the data in the column will be lost.
- You are about to drop the column `updatedAt` on the `service_categories` table. All the data in the column will be lost.
- You are about to drop the column `baseSalePrice` on the `services` table. All the data in the column will be lost.
- You are about to drop the column `categoryId` on the `services` table. All the data in the column will be lost.
- You are about to drop the column `createdAt` on the `services` table. All the data in the column will be lost.
- You are about to drop the column `deletedAt` on the `services` table. All the data in the column will be lost.
- You are about to drop the column `updatedAt` on the `services` table. All the data in the column will be lost.
- A unique constraint covering the columns `[local_sku]` on the table `services` will be added. If there are existing duplicate values, this will fail.
- Added the required column `account_id` to the `customers` table without a default value. This is not possible if the table is not empty.
- Added the required column `complex_id` to the `customers` table without a default value. This is not possible if the table is not empty.
- Added the required column `account_id` to the `good_categories` table without a default value. This is not possible if the table is not empty.
- Added the required column `complex_id` to the `good_categories` table without a default value. This is not possible if the table is not empty.
- Added the required column `account_id` to the `goods` table without a default value. This is not possible if the table is not empty.
- Added the required column `complex_id` to the `goods` table without a default value. This is not possible if the table is not empty.
- Added the required column `account_id` to the `sales_invoices` table without a default value. This is not possible if the table is not empty.
- Added the required column `complex_id` to the `sales_invoices` table without a default value. This is not possible if the table is not empty.
- Added the required column `account_id` to the `service_categories` table without a default value. This is not possible if the table is not empty.
- Added the required column `complex_id` to the `service_categories` table without a default value. This is not possible if the table is not empty.
- Added the required column `updated_at` to the `service_categories` table without a default value. This is not possible if the table is not empty.
- Added the required column `account_id` to the `services` table without a default value. This is not possible if the table is not empty.
- Added the required column `complex_id` to the `services` table without a default value. This is not possible if the table is not empty.
- Added the required column `updated_at` to the `services` table without a default value. This is not possible if the table is not empty.
*/
-- DropForeignKey
ALTER TABLE `services` DROP FOREIGN KEY `services_categoryId_fkey`;
-- DropIndex
DROP INDEX `services_categoryId_idx` ON `services`;
-- AlterTable
ALTER TABLE `customers` ADD COLUMN `account_id` VARCHAR(191) NOT NULL,
ADD COLUMN `complex_id` VARCHAR(191) NOT NULL;
-- AlterTable
ALTER TABLE `good_categories` ADD COLUMN `account_id` VARCHAR(191) NOT NULL,
ADD COLUMN `complex_id` VARCHAR(191) NOT NULL;
-- AlterTable
ALTER TABLE `goods` ADD COLUMN `account_id` VARCHAR(191) NOT NULL,
ADD COLUMN `complex_id` VARCHAR(191) NOT NULL,
MODIFY `local_sku` VARCHAR(100) NULL;
-- AlterTable
ALTER TABLE `sales_invoices` ADD COLUMN `account_id` VARCHAR(191) NOT NULL,
ADD COLUMN `complex_id` VARCHAR(191) NOT NULL;
-- AlterTable
ALTER TABLE `service_categories` DROP COLUMN `createdAt`,
DROP COLUMN `deletedAt`,
DROP COLUMN `imageUrl`,
DROP COLUMN `updatedAt`,
ADD COLUMN `account_id` VARCHAR(191) NOT NULL,
ADD COLUMN `complex_id` VARCHAR(191) NOT NULL,
ADD COLUMN `created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
ADD COLUMN `deleted_at` TIMESTAMP(0) NULL,
ADD COLUMN `image_url` VARCHAR(255) NULL,
ADD COLUMN `updated_at` TIMESTAMP(0) NOT NULL;
-- AlterTable
ALTER TABLE `services` DROP COLUMN `baseSalePrice`,
DROP COLUMN `categoryId`,
DROP COLUMN `createdAt`,
DROP COLUMN `deletedAt`,
DROP COLUMN `updatedAt`,
ADD COLUMN `account_id` VARCHAR(191) NOT NULL,
ADD COLUMN `base_sale_price` DECIMAL(15, 0) NOT NULL DEFAULT 0.00,
ADD COLUMN `category_id` VARCHAR(191) NULL,
ADD COLUMN `complex_id` VARCHAR(191) NOT NULL,
ADD COLUMN `created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
ADD COLUMN `deleted_at` TIMESTAMP(0) NULL,
ADD COLUMN `local_sku` VARCHAR(100) NULL,
ADD COLUMN `updated_at` TIMESTAMP(0) NOT NULL;
-- CreateIndex
CREATE UNIQUE INDEX `services_local_sku_key` ON `services`(`local_sku`);
-- CreateIndex
CREATE INDEX `services_category_id_idx` ON `services`(`category_id`);
-- AddForeignKey
ALTER TABLE `services` ADD CONSTRAINT `services_category_id_fkey` FOREIGN KEY (`category_id`) REFERENCES `service_categories`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;