34132-vm/db/migrations/002_add_templates.sql
Flatlogic Bot 7a4a20350d MagiCV
2025-09-17 12:13:33 +00:00

15 lines
525 B
SQL

CREATE TABLE IF NOT EXISTS `templates` (
`id` INT AUTO_INCREMENT PRIMARY KEY,
`name` VARCHAR(255) NOT NULL,
`description` TEXT,
`file_path` VARCHAR(255) NOT NULL,
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
ALTER TABLE `cvs` ADD COLUMN `template_id` INT NULL;
-- Insert some default templates
INSERT INTO `templates` (`name`, `description`, `file_path`) VALUES
('Minimalist', 'A clean and simple template.', 'minimalist.php'),
('Professional', 'A classic and professional template.', 'professional.php');