Files
demat-facturation/drizzle/0004_white_the_hunter.sql

21 lines
873 B
SQL

CREATE TABLE `accountingAllocationList` (
`id` int AUTO_INCREMENT NOT NULL,
`userId` int NOT NULL,
`name` varchar(100) NOT NULL,
`createdAt` timestamp NOT NULL DEFAULT (now()),
CONSTRAINT `accountingAllocationList_id` PRIMARY KEY(`id`),
CONSTRAINT `user_allocation_unique` UNIQUE(`userId`,`name`)
);
--> statement-breakpoint
CREATE TABLE `departmentList` (
`id` int AUTO_INCREMENT NOT NULL,
`userId` int NOT NULL,
`name` varchar(100) NOT NULL,
`createdAt` timestamp NOT NULL DEFAULT (now()),
CONSTRAINT `departmentList_id` PRIMARY KEY(`id`),
CONSTRAINT `user_department_unique` UNIQUE(`userId`,`name`)
);
--> statement-breakpoint
ALTER TABLE `invoices` ADD `serviceConcerne` varchar(100);--> statement-breakpoint
ALTER TABLE `invoices` ADD `typeAchat` enum('CAPEX','OPEX');--> statement-breakpoint
ALTER TABLE `invoices` ADD `ventilationComptable` varchar(100);