Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE `courses_course` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `created_at` datetime(6) NOT NULL,
- `updated_at` datetime(6) NOT NULL,
- `start_at` datetime(6) DEFAULT NULL,
- `max_attendees` int(11) NOT NULL,
- `price` decimal(6,2) NOT NULL,
- `location_id` int(11) NOT NULL,
- `offer_id` int(11) NOT NULL,
- `sublocation_id` int(11) NOT NULL,
- `user_id` int(11) NOT NULL,
- PRIMARY KEY (`id`),
- KEY `courses_course_location_id_50c8bd8a_fk_locations_location_id` (`location_id`),
- KEY `courses_course_offer_id_a1ed1671_fk_offers_offer_id` (`offer_id`),
- KEY `courses_course_sublocation_id_d778a45a_fk_locations` (`sublocation_id`),
- KEY `courses_course_user_id_8a39a2bb_fk_auth_user_id` (`user_id`),
- CONSTRAINT `courses_course_location_id_50c8bd8a_fk_locations_location_id` FOREIGN KEY (`location_id`) REFERENCES `locations_location` (`id`),
- CONSTRAINT `courses_course_offer_id_a1ed1671_fk_offers_offer_id` FOREIGN KEY (`offer_id`) REFERENCES `offers_offer` (`id`),
- CONSTRAINT `courses_course_sublocation_id_d778a45a_fk_locations` FOREIGN KEY (`sublocation_id`) REFERENCES `locations_sublocation` (`id`),
- CONSTRAINT `courses_course_user_id_8a39a2bb_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4
- CREATE TABLE `courses_courseunit` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `start_at` datetime(6) DEFAULT NULL,
- `end_at` datetime(6) DEFAULT NULL,
- `course_id` int(11) NOT NULL,
- PRIMARY KEY (`id`),
- KEY `courses_courseunit_course_id_b57ebb27_fk_courses_course_id` (`course_id`),
- CONSTRAINT `courses_courseunit_course_id_b57ebb27_fk_courses_course_id` FOREIGN KEY (`course_id`) REFERENCES `courses_course` (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement