DROP TABLE IF EXISTS `activities`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `activities` ( `activity_id` int(11) NOT NULL auto_increment, `student_id` int(11) NOT NULL, `sco_id` int(11) NOT NULL, `sco_fso` varchar(4000) NOT NULL, `last_action_date` timestamp NOT NULL default '0000-00-00 00:00:00' on update CURRENT_TIMESTAMP, `score` varchar(4) NOT NULL, `status` varchar(10) NOT NULL, PRIMARY KEY (`activity_id`), KEY `sco_id` (`sco_id`), CONSTRAINT `activities_ibfk_1` FOREIGN KEY (`sco_id`) REFERENCES `scos` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; -- -- Table structure for table `scos` -- DROP TABLE IF EXISTS `scos`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `scos` ( `id` int(11) NOT NULL auto_increment, `course_id` varchar(50) NOT NULL, `course_title` varchar(50) NOT NULL, `sco_id` varchar(50) NOT NULL, `sco_title` varchar(50) NOT NULL, `sco_mastery_score` int(11) NOT NULL, `sco_href` text NOT NULL, `sco_path` varchar(100) NOT NULL, `deleted` tinyint(1) NOT NULL default '0', `hidden` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; -- -- Table structure for table `students` -- DROP TABLE IF EXISTS `students`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `students` ( `id` int(11) NOT NULL auto_increment, `station` int(3) NOT NULL, `fname` varchar(25) NOT NULL, `lname` varchar(25) NOT NULL, `email` varchar(100) NOT NULL, `pass` varchar(15) NOT NULL, `group` int(3) NOT NULL, `account_type` varchar(25) NOT NULL default 'student', PRIMARY KEY (`id`), UNIQUE KEY `email` (`email`) ) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client;