36293-vm/db/migrations/002_create_projects_table.sql
2025-11-25 21:05:38 +00:00

14 lines
585 B
SQL

CREATE TABLE IF NOT EXISTS `projects` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`wbs` varchar(255) DEFAULT NULL,
`startDate` date DEFAULT NULL,
`endDate` date DEFAULT NULL,
`budget` decimal(15,2) DEFAULT 0.00,
`recoverability` decimal(5,2) DEFAULT 100.00,
`targetMargin` decimal(5,2) DEFAULT 0.00,
`createdAt` timestamp NOT NULL DEFAULT current_timestamp(),
`updatedAt` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;