36459-vm/db/migrations/002_seed_data.sql
2025-11-29 17:28:26 +00:00

39 lines
1.4 KiB
SQL

-- Migration: 002_seed_data.sql
-- Timestamp: 2025-11-29 12:00:00 UTC
-- Description: Seed initial data for testing.
SET autocommit=0;
START TRANSACTION;
--
-- Seed data for table `users`
--
INSERT INTO `users` (`id`, `username`, `password`, `email`) VALUES
(1, 'testuser', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'testuser@example.com');
--
-- Seed data for table `challenges`
--
INSERT INTO `challenges` (`id`, `title`, `description`, `learning_style`, `challenge_type`, `difficulty`, `sample_cases_json`) VALUES
(1, 'Python: Hello World', 'Create a Python script that prints \'Hello, World!\'', 'read_write', 'python', 'beginner', '[{"input": "", "output": "Hello, World!"}]');
--
-- Seed data for table `challenge_submissions`
--
INSERT INTO `challenge_submissions` (`id`, `user_id`, `challenge_id`, `language`, `submission_content`, `status`, `attempt_number`) VALUES
(1, 1, 1, 'python', 'print("Hello, World!")', 'pending', 1);
--
-- Seed data for table `badges`
--
INSERT INTO `badges` (`id`, `name`, `description`, `criteria_json`) VALUES
(1, 'First Challenge Completed', 'Awarded for completing your first coding challenge.', '{"challenge_completions": 1}');
--
-- Seed data for table `competitions`
--
INSERT INTO `competitions` (`id`, `title`, `description`, `start_date`, `end_date`) VALUES
(1, 'December 2025 Coding Competition', 'A fun competition to test your coding skills.', '2025-12-01 00:00:00', '2025-12-31 23:59:59');
COMMIT;