ADD: added some quiality of life features

This commit is contained in:
hwinkel
2026-03-15 19:53:11 +01:00
parent f5b259cae2
commit 40a2764dd0
30 changed files with 1397 additions and 51 deletions
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE `invoices` ADD COLUMN `deletedAt` DATETIME(3) NULL;
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE `invoices` MODIFY `number` VARCHAR(191) NULL;
@@ -0,0 +1,17 @@
-- CreateTable
CREATE TABLE `services` (
`id` VARCHAR(191) NOT NULL,
`companyId` VARCHAR(191) NOT NULL,
`name` VARCHAR(191) NOT NULL,
`description` TEXT NULL,
`unit` VARCHAR(191) NULL,
`unitPrice` DECIMAL(10, 2) NOT NULL,
`taxRate` DECIMAL(5, 2) NOT NULL,
`createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
`updatedAt` DATETIME(3) NOT NULL,
PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-- AddForeignKey
ALTER TABLE `services` ADD CONSTRAINT `services_companyId_fkey` FOREIGN KEY (`companyId`) REFERENCES `companies`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;