34695-vm/db/migrations/002_create_deals_table.sql
Flatlogic Bot 90597ae75f draftv1
2025-10-05 16:43:57 +00:00

16 lines
606 B
SQL

CREATE TABLE IF NOT EXISTS `deals` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`vendor` varchar(255) DEFAULT NULL,
`website` varchar(255) DEFAULT NULL,
`purchase_date` date DEFAULT NULL,
`price` decimal(10,2) DEFAULT 0.00,
`currency` varchar(10) DEFAULT 'USD',
`username` varchar(255) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
`category` varchar(100) DEFAULT NULL,
`tags` text DEFAULT NULL,
`rating` tinyint(1) DEFAULT 0,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;