Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- See http://stackoverflow.com/questions/13826474/cakephp-containable-with-habtm
- --
- -- phpMyAdmin SQL Dump
- -- version 3.5.1
- -- http://www.phpmyadmin.net
- --
- -- Host: localhost
- -- Generation Time: Dec 11, 2012 at 11:37 AM
- -- Server version: 5.5.25
- -- PHP Version: 5.2.17
- SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
- SET time_zone = "+00:00";
- --
- -- Database: `test_db`
- --
- -- --------------------------------------------------------
- --
- -- Table structure for table `courses`
- --
- CREATE TABLE `courses` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `teacher_id` int(10) unsigned NOT NULL,
- `title` varchar(100) NOT NULL,
- `start_date` date NOT NULL,
- `end_date` date NOT NULL,
- `created` datetime NOT NULL,
- `modified` datetime NOT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
- --
- -- Dumping data for table `courses`
- --
- INSERT INTO `courses` (`id`, `teacher_id`, `title`, `start_date`, `end_date`, `created`, `modified`) VALUES
- (1, 1, 'Introduction to Improvisation', '2012-12-17', '2012-12-21', '2012-12-11 00:00:00', '2012-12-11 00:00:00'),
- (2, 2, 'Painting', '2012-12-17', '2012-12-21', '2012-12-11 00:00:00', '2012-12-11 00:00:00');
- -- --------------------------------------------------------
- --
- -- Table structure for table `courses_students`
- --
- CREATE TABLE `courses_students` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `course_id` int(10) unsigned NOT NULL,
- `student_id` int(10) unsigned NOT NULL,
- `is_approved` tinyint(1) unsigned DEFAULT NULL,
- `created` datetime NOT NULL,
- `modified` datetime NOT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
- --
- -- Dumping data for table `courses_students`
- --
- INSERT INTO `courses_students` (`id`, `course_id`, `student_id`, `is_approved`, `created`, `modified`) VALUES
- (1, 1, 1, NULL, '2012-12-11 00:00:00', '2012-12-11 00:00:00'),
- (2, 2, 1, 1, '2012-12-11 00:00:00', '2012-12-11 00:00:00'),
- (3, 1, 2, 1, '2012-12-11 00:00:00', '2012-12-11 00:00:00'),
- (4, 2, 2, NULL, '2012-12-11 00:00:00', '2012-12-11 00:00:00');
- -- --------------------------------------------------------
- --
- -- Table structure for table `students`
- --
- CREATE TABLE `students` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `first_name` varchar(100) NOT NULL,
- `last_name` varchar(100) NOT NULL,
- `grade` tinyint(3) unsigned NOT NULL,
- `created` datetime NOT NULL,
- `modified` datetime NOT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
- --
- -- Dumping data for table `students`
- --
- INSERT INTO `students` (`id`, `first_name`, `last_name`, `grade`, `created`, `modified`) VALUES
- (1, 'Bill', 'Brown', 9, '2012-12-11 00:00:00', '2012-12-11 00:00:00'),
- (2, 'Sally', 'Smith', 10, '2012-12-11 00:00:00', '2012-12-11 00:00:00');
- -- --------------------------------------------------------
- --
- -- Table structure for table `teachers`
- --
- CREATE TABLE `teachers` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `first_name` varchar(100) NOT NULL,
- `last_name` varchar(100) NOT NULL,
- `created` datetime NOT NULL,
- `modified` datetime NOT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
- --
- -- Dumping data for table `teachers`
- --
- INSERT INTO `teachers` (`id`, `first_name`, `last_name`, `created`, `modified`) VALUES
- (1, 'John', 'Doe', '2012-12-11 00:00:00', '2012-12-11 00:00:00'),
- (2, 'Jane', 'Doe', '2012-12-11 00:00:00', '2012-12-11 00:00:00');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement