34853-vm/db/migrations/002_create_plans_table.sql
2025-10-11 05:03:50 +00:00

19 lines
929 B
SQL

-- Create the plans table
CREATE TABLE IF NOT EXISTS `plans` (
`id` INT AUTO_INCREMENT PRIMARY KEY,
`name` VARCHAR(255) NOT NULL,
`speed` VARCHAR(100) NOT NULL, -- e.g., '25/10 Mbps'
`price` DECIMAL(10, 2) NOT NULL,
`description` TEXT,
`is_active` BOOLEAN NOT NULL DEFAULT TRUE,
`contract_months` INT NOT NULL DEFAULT 1, -- e.g., 1 for month-to-month, 12 for a year
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Insert the initial plans from the landing page
INSERT INTO `plans` (`name`, `speed`, `price`, `description`, `contract_months`) VALUES
('Basic', '25/10 Mbps', 59.00, 'Ideal for browsing and streaming.', 1),
('Standard', '50/20 Mbps', 69.00, 'Perfect for HD streaming and gaming.', 1),
('Premium', '100/40 Mbps', 89.00, 'For heavy usage and multiple devices.', 12),
('Ultimate', '1000/50 Mbps', 129.00, 'Ultimate speed for professionals.', 12);