KEY `login` (`login`)
) ENGINE = MyISAM;
-
# --------------------------------------------------------
# Table structure for table `assignments`
# since 1.5.3
KEY `course_id` (`course_id`)
) ENGINE = MyISAM;
-
# --------------------------------------------------------
## Table for `blog_posts`
`body` TEXT,
PRIMARY KEY (`post_id`)
) ENGINE = MyISAM;
-
# --------------------------------------------------------
## Table for `blog_posts_comments`
# --------------------------------------------------------
# Table structure for table `course_tests_assoc`
# since 1.6.2
+
CREATE TABLE `content_tests_assoc` (
`content_id` INTEGER UNSIGNED NOT NULL,
`test_id` INTEGER UNSIGNED NOT NULL,
PRIMARY KEY (`content_id`, `test_id`)
-)
-ENGINE = MyISAM;
+) ENGINE = MyISAM;
# --------------------------------------------------------
`content_id` INTEGER UNSIGNED NOT NULL,
`forum_id` INTEGER UNSIGNED NOT NULL,
PRIMARY KEY ( `content_id` , `forum_id` )
-)
-ENGINE = MyISAM;
+) ENGINE = MyISAM;
# --------------------------------------------------------
# Table structure for table `course_enrollment`
PRIMARY KEY (`member_id`,`course_id`)
) ENGINE = MyISAM;
-
-
# --------------------------------------------------------
# Table structure for table `course_stats`
# --------------------------------------------------------
# Table structure for table `faq_entries`
+
CREATE TABLE `faq_entries` (
`entry_id` mediumint(8) NOT NULL auto_increment,
`topic_id` mediumint(8) NOT NULL default '0',
# --------------------------------------------------------
# Table structure for table `feeds`
+
CREATE TABLE `feeds` (
`feed_id` mediumint(8) unsigned NOT NULL auto_increment,
`url` varchar(255) NOT NULL default '',
PRIMARY KEY (`feed_id`)
-) ;
+) ENGINE = MyISAM ;
# --------------------------------------------------------
-
-#
# Table structure for table `file_storage_groups`
# added 1.5.3
PRIMARY KEY ( `group_id` )
) ENGINE = MyISAM;
-#
+# --------------------------------------------------------
# Table structure for table `files`
# added 1.5.3
) ENGINE = MyISAM;
# --------------------------------------------------------
-
-#
# Table structure for table `files_comments`
# added 1.5.3
PRIMARY KEY (`folder_id`)
) ENGINE = MyISAM;
-
# --------------------------------------------------------
# Table structure for table `forums`
PRIMARY KEY (`forum_id`)
) ENGINE = MyISAM;
-
# --------------------------------------------------------
# Table structure for table `forums_accessed`
KEY `course_id` (`course_id`)
) ENGINE = MyISAM;
-
# --------------------------------------------------------
# Table structure for table `forums_groups`
PRIMARY KEY (`forum_id`,`member_id`)
) ENGINE = MyISAM;
-
# --------------------------------------------------------
# Table structure for table `forums_threads`
PRIMARY KEY (`group_id`)
) ENGINE = MyISAM;
-
# --------------------------------------------------------
# Table structure for table `groups_members`
# --------------------------------------------------------
# Table structure for table `guests` (since 1.6.2)
+
CREATE TABLE `guests` (
`guest_id` VARCHAR(10) NOT NULL,
`name` VARCHAR(255),
# Table structure for table `handbook_notes`
CREATE TABLE `handbook_notes` (
-`note_id` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT ,
-`date` TIMESTAMP NOT NULL,
-`section` VARCHAR( 15 ) NOT NULL default '',
-`page` VARCHAR( 50 ) NOT NULL default '',
-`approved` tinyint NOT NULL default 0,
-`email` VARCHAR( 50 ) NOT NULL default '',
-`note` TEXT ,
-PRIMARY KEY ( `note_id` )
+ `note_id` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT ,
+ `date` TIMESTAMP NOT NULL,
+ `section` VARCHAR( 15 ) NOT NULL default '',
+ `page` VARCHAR( 50 ) NOT NULL default '',
+ `approved` tinyint NOT NULL default 0,
+ `email` VARCHAR( 50 ) NOT NULL default '',
+ `note` TEXT ,
+ PRIMARY KEY ( `note_id` )
) ENGINE = MyISAM;
-
# --------------------------------------------------------
# Table structure for table `instructor_approvals`
PRIMARY KEY (`member_id`)
) ENGINE = MyISAM;
-
CREATE TABLE `languages` (
`language_code` varchar(20) NOT NULL default '',
`char_set` varchar(80) NOT NULL default '',
#
INSERT INTO `languages` VALUES ('en', 'utf-8', 'ltr', 'en([-_][[:alpha:]]{2})?|english', 'English', 'English', 3);
-
# Table structure for table `links_categories`
KEY `owner_id` (`owner_id`)
) ENGINE = MyISAM ;
-
# --------------------------------------------------------
# Table structure for table `links`
INSERT INTO `modules` VALUES ('_core/modules', 2, 0, 8192, 0, 0);
INSERT INTO `modules` VALUES('_standard/vimeo', 2, 0, 1, 0, 0);
-
-
-
# --------------------------------------------------------
# Table structure for table `news`
# --------------------------------------------------------
# Table structure for table `polls`
+
CREATE TABLE `polls` (
`poll_id` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT ,
`course_id` MEDIUMINT UNSIGNED NOT NULL default 0,
) ENGINE = MyISAM;
# --------------------------------------------------------
-
# Table structure for table `polls_members`
CREATE TABLE `polls_members` (
) ENGINE = MyISAM;
# --------------------------------------------------------
-
# Table structure for table `related_content`
CREATE TABLE `related_content` (
`content_id` mediumint(8) unsigned NOT NULL default '0',
PRIMARY KEY (`test_id`)
) ENGINE = MyISAM;
-
# --------------------------------------------------------
# Table structure for table `tests_answers`
PRIMARY KEY (`result_id`,`question_id`,`member_id`)
) ENGINE = MyISAM;
-
# --------------------------------------------------------
# Table structure for table `tests_groups`
KEY `test_id` (`test_id`)
) ENGINE = MyISAM;
-
# --------------------------------------------------------
# Table structure for table `tests_questions`
PRIMARY KEY (`title`)
) ENGINE = MyISAM;
-
# --------------------------------------------------------
# Table structure for table `patches`
# since 1.6.1
`author` VARCHAR(255) NOT NULL,
`installed_date` datetime NOT NULL,
PRIMARY KEY (`patches_id`)
-);
-
+) ENGINE = MyISAM ;
# --------------------------------------------------------
# Table structure for table `patches_files`
`name` TEXT,
`location` VARCHAR(250) NOT NULL default '',
PRIMARY KEY (`patches_files_id`)
-);
+) ENGINE = MyISAM ;
# --------------------------------------------------------
# Table structure for table `patches_files_actions`
`code_from` TEXT,
`code_to` TEXT,
PRIMARY KEY (`patches_files_actions_id`)
-);
-
-
+) ENGINE = MyISAM ;
# --------------------------------------------------------
# New tables for patch creator
# since 1.6.1
+
CREATE TABLE `myown_patches` (
`myown_patch_id` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT,
`atutor_patch_id` VARCHAR(20) NOT NULL default '',
`status` varchar(20) NOT NULL default '',
`last_modified` datetime NOT NULL,
PRIMARY KEY (`myown_patch_id`)
-);
+) ENGINE = MyISAM ;
CREATE TABLE `myown_patches_dependent` (
`myown_patches_dependent_id` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT,
`myown_patch_id` MEDIUMINT UNSIGNED NOT NULL,
`dependent_patch_id` VARCHAR(50) NOT NULL default '',
PRIMARY KEY (`myown_patches_dependent_id`)
-);
+) ENGINE = MyISAM ;
CREATE TABLE `myown_patches_files` (
`myown_patches_files_id` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT,
`code_to` TEXT,
`uploaded_file` TEXT,
PRIMARY KEY (`myown_patches_files_id`)
-);
-
-
-
-
+) ENGINE = MyISAM ;
# insert the default theme
INSERT INTO `themes` VALUES ('ATutor', '2.0.2', 'default', 'Desktop', NOW(), 'This is the default ATutor theme and cannot be deleted as other themes inherit from it. Please do not alter this theme directly as it would complicate upgrading. Instead, create a new theme derived from this one.', 2);
INSERT INTO `themes` VALUES ('IDI Theme', '2.0.2', 'idi', 'Desktop', '2010-12-02', 'The theme created for the IDI course server.', '1');
INSERT INTO `themes` VALUES ('Mobile', '2.0.2', 'mobile', 'Mobile', NOW(), 'This is the default theme for mobile devices.', 3);
-
-
# --------------------------------------------------------
# Table structure for table `users_online`
`associate_string` VARCHAR(10) NOT NULL,
`name` VARCHAR( 50 ) NOT NULL default '',
PRIMARY KEY ( `auto_enroll_id` )
-);
+) ENGINE = MyISAM ;
# --------------------------------------------------------
# Table structure for table `auto_enroll_courses`
`auto_enroll_id` MEDIUMINT UNSIGNED NOT NULL default 0,
`course_id` MEDIUMINT UNSIGNED NOT NULL default 0,
PRIMARY KEY ( `auto_enroll_courses_id` )
-);
+) ENGINE = MyISAM ;
+# Setup Table for Access4All
-#Setup Table for Access4All
CREATE TABLE `primary_resources` (
`primary_resource_id` mediumint(8) unsigned NOT NULL auto_increment,
`content_id` mediumint(8) unsigned NOT NULL default '0',
INSERT INTO `config` (`name`, `value`) VALUES('transformable_web_service_id', '90c3cd6f656739969847f3a99ac0f3c7');
INSERT INTO `config` (`name`, `value`) VALUES('transformable_oauth_expire', '93600');
-#End Access4All setup
+# End Access4All setup
-# sql file for gradebook module
+# Tables for gradebook module
CREATE TABLE `grade_scales` (
`grade_scale_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`scale_name` VARCHAR(255) NOT NULL default '',
`created_date` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY ( `grade_scale_id` )
-);
+) ENGINE = MyISAM ;
CREATE TABLE `grade_scales_detail` (
`grade_scale_id` mediumint(8) unsigned NOT NULL,
`percentage_from` MEDIUMINT NOT NULL default '0',
`percentage_to` MEDIUMINT NOT NULL default '0',
PRIMARY KEY (`grade_scale_id`, `scale_value`)
-);
+) ENGINE = MyISAM ;
CREATE TABLE `gradebook_tests` (
`gradebook_test_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`due_date` datetime NOT NULL default '0000-00-00 00:00:00',
`grade_scale_id` mediumint(8) unsigned NOT NULL default '0',
PRIMARY KEY ( `gradebook_test_id` )
-);
+) ENGINE = MyISAM ;
CREATE TABLE `gradebook_detail` (
`gradebook_test_id` mediumint(8) unsigned NOT NULL,
`member_id` mediumint(8) unsigned NOT NULL default '0',
`grade` VARCHAR(255) NOT NULL default '',
PRIMARY KEY (`gradebook_test_id`, `member_id`)
-);
+) ENGINE = MyISAM ;
INSERT INTO `grade_scales` (grade_scale_id, member_id, scale_name, created_date) values (1, 0, 'Letter Grade', now());
INSERT INTO `grade_scales` (grade_scale_id, member_id, scale_name, created_date) values (2, 0, 'Competency 1', now());
# END gradebook SQL
-# Create table for standalone student tools page
+# Tables for standalone student tools page
CREATE TABLE `fha_student_tools` (
`course_id` mediumint(8) unsigned NOT NULL,
`links` TEXT ,
`home_view` tinyint NOT NULL DEFAULT 1,
PRIMARY KEY ( `course_id` )
-);
-
+) ENGINE = MyISAM ;
-# Setup tables for Social Networking module
+# Tables for Social Networking module
# Activities
CREATE TABLE `social_activities` (
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`title` TEXT,
`created_date` TIMESTAMP NOT NULL,
PRIMARY KEY (`id`)
-)
-ENGINE = MyISAM;
+) ENGINE = MyISAM;
# Applications/ Gagdets table
CREATE TABLE `social_applications` (
`views` TEXT,
`last_updated` TIMESTAMP NOT NULL,
PRIMARY KEY (`url`)
-)
-ENGINE = MyISAM;
+) ENGINE = MyISAM;
# Application Settings, like storing the perference string.
CREATE TABLE `social_application_settings` (
`name` VARCHAR(255) NOT NULL,
`value` TEXT,
PRIMARY KEY (`application_id`, `member_id`, `name`)
-)
-ENGINE = MyISAM;
+) ENGINE = MyISAM;
# Application members mapping
CREATE TABLE `social_members_applications` (
`member_id` INTEGER UNSIGNED NOT NULL,
`application_id` INTEGER UNSIGNED NOT NULL,
PRIMARY KEY (`member_id`, `application_id`)
-)
-ENGINE = MyISAM;
+) ENGINE = MyISAM;
# Friends table
CREATE TABLE `social_friends` (
`friend_id` INTEGER UNSIGNED NOT NULL,
`relationship` INTEGER UNSIGNED NOT NULL,
PRIMARY KEY (`member_id`, `friend_id`)
-)
-ENGINE = MyISAM;
+) ENGINE = MyISAM;
# Friend requests table
CREATE TABLE `social_friend_requests` (
`friend_id` INTEGER UNSIGNED NOT NULL,
`relationship` INTEGER UNSIGNED NOT NULL,
PRIMARY KEY (`member_id`, `friend_id`)
-)
-ENGINE = MyISAM;
+) ENGINE = MyISAM;
# Person Positions (jobs)
CREATE TABLE `social_member_position` (
`to` VARCHAR(10) NOT NULL DEFAULT 0,
`description` TEXT,
PRIMARY KEY (`id`)
-)
-ENGINE = MyISAM;
+) ENGINE = MyISAM;
# Person education
CREATE TABLE `social_member_education` (
`to` VARCHAR(10) NOT NULL DEFAULT 0,
`description` TEXT,
PRIMARY KEY (`id`)
-)
-ENGINE = MyISAM;
+) ENGINE = MyISAM;
# Person related web sites
CREATE TABLE `social_member_websites` (
`url` VARCHAR(255) NOT NULL,
`site_name` VARCHAR(255),
PRIMARY KEY (`id`)
-)
-ENGINE = MyISAM;
+) ENGINE = MyISAM;
# Tracks visitor counts
CREATE TABLE `social_member_track` (
`visitor_id` INTEGER UNSIGNED NOT NULL,
`timestamp` TIMESTAMP NOT NULL,
PRIMARY KEY (`member_id`, `visitor_id`, `timestamp`)
-)
-ENGINE = MyISAM;
+) ENGINE = MyISAM;
# Person additional information cojoint with the members table
CREATE TABLE `social_member_additional_information` (
`awards` TEXT,
`others` TEXT,
PRIMARY KEY (`member_id`)
-)
-ENGINE = MyISAM;
+) ENGINE = MyISAM;
# New Social Tables
CREATE TABLE `social_member_contact` (
`con_name` varchar(200) NOT NULL,
`con_phone` varchar(15) NOT NULL,
`con_email` varchar(50) NOT NULL,
- `con_address` text NOT NULL,
+ `con_address` text,
PRIMARY KEY (`contact_id`)
) ENGINE=MyISAM ;
-
CREATE TABLE `social_member_representation` (
`rep_id` int(10) unsigned NOT NULL auto_increment,
`member_id` int(10) unsigned NOT NULL,
`rep_title` varchar(50) NOT NULL,
`rep_phone` varchar(15) NOT NULL,
`rep_email` varchar(50) NOT NULL,
- `rep_address` text NOT NULL,
+ `rep_address` text,
PRIMARY KEY (`rep_id`)
) ENGINE=MyISAM ;
-
-
CREATE TABLE `social_member_personal` (
`per_id` int(10) unsigned NOT NULL auto_increment,
`member_id` int(10) unsigned NOT NULL,
`member_id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`preferences` TEXT,
PRIMARY KEY (`member_id`)
-)
-ENGINE = MyISAM;
+) ENGINE = MyISAM;
# Social Group tables
CREATE TABLE `social_groups` (
`created_date` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
`last_updated` TIMESTAMP NOT NULL,
PRIMARY KEY (`id`)
-)
-ENGINE = MyISAM;
+) ENGINE = MyISAM;
CREATE TABLE `social_groups_activities` (
`activity_id` INTEGER UNSIGNED NOT NULL,
`group_id` INTEGER UNSIGNED NOT NULL,
PRIMARY KEY (`activity_id`, `group_id`)
-)
-ENGINE = MyISAM;
+) ENGINE = MyISAM;
CREATE TABLE `social_groups_members` (
`group_id` INTEGER UNSIGNED NOT NULL,
`member_id` INTEGER UNSIGNED NOT NULL,
PRIMARY KEY (`group_id`, `member_id`)
-)
-ENGINE = MyISAM;
+) ENGINE = MyISAM;
CREATE TABLE `social_groups_invitations` (
`sender_id` INTEGER UNSIGNED NOT NULL,
`member_id` INTEGER UNSIGNED NOT NULL,
`group_id` INTEGER UNSIGNED NOT NULL,
PRIMARY KEY (`sender_id`, `member_id`, `group_id`)
-)
-ENGINE = MyISAM;
+) ENGINE = MyISAM;
CREATE TABLE `social_groups_requests` (
`sender_id` INTEGER UNSIGNED NOT NULL,
`member_id` INTEGER UNSIGNED NOT NULL,
`group_id` INTEGER UNSIGNED NOT NULL,
PRIMARY KEY (`sender_id`, `member_id`, `group_id`)
-)
-ENGINE = MyISAM;
+) ENGINE = MyISAM;
CREATE TABLE `social_groups_types` (
`type_id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`title` VARCHAR(127) NOT NULL,
PRIMARY KEY (`type_id`)
-)
-ENGINE = MyISAM;
+) ENGINE = MyISAM;
# CREATE TABLE `social_groups_forums` (
# `group_id` INTEGER UNSIGNED NOT NULL,
# `forum_id` INTEGER UNSIGNED NOT NULL,
# PRIMARY KEY (`group_id`, `forum_id`)
-# )
-# ENGINE = MyISAM;
+# ) ENGINE = MyISAM;
# Groups message board
CREATE TABLE `social_groups_board` (
PRIMARY KEY (`id`)
) ENGINE=MyISAM;
-
# Settings
CREATE TABLE `social_user_settings` (
`member_id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`app_settings` TEXT,
PRIMARY KEY (`member_id`)
-)
-ENGINE = MyISAM;
-
+) ENGINE = MyISAM;
#====== Initial Data ========
INSERT INTO social_groups_types SET title='business', type_id=1;
CREATE TABLE `oauth_client_servers` (
`oauth_server_id` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT,
`oauth_server` VARCHAR(255) NOT NULL default '',
- `consumer_key` TEXT NOT NULL ,
- `consumer_secret` TEXT NOT NULL ,
+ `consumer_key` TEXT,
+ `consumer_secret` TEXT,
`expire_threshold` INT NOT NULL default 0,
`create_date` datetime NOT NULL,
PRIMARY KEY ( `oauth_server_id` ),
`oauth_server_id` MEDIUMINT UNSIGNED NOT NULL,
`token` VARCHAR(50) NOT NULL default '',
`token_type` VARCHAR(50) NOT NULL NOT NULL default '',
- `token_secret` TEXT NOT NULL,
+ `token_secret` TEXT,
`member_id` mediumint(8) unsigned NOT NULL ,
`assign_date` datetime NOT NULL,
PRIMARY KEY ( `oauth_server_id`, `token` )
# END Adding feature of oauth client
-
# -------------- Photo Album Module Setup ----------------
# Photo Album Table
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`location` VARCHAR(255) NOT NULL,
- `description` TEXT NOT NULL,
+ `description` TEXT,
`permission` TINYINT(1) UNSIGNED NOT NULL,
`member_id` INTEGER UNSIGNED NOT NULL,
`photo_id` INTEGER UNSIGNED NOT NULL,
`created_date` DATETIME NOT NULL,
`last_updated` DATETIME NOT NULL,
PRIMARY KEY (`id`)
-)
-ENGINE = MyISAM;
+) ENGINE = MyISAM;
# Photos Table
CREATE TABLE `pa_photos` (
`created_date` DATETIME NOT NULL,
`last_updated` DATETIME NOT NULL,
PRIMARY KEY (`id`)
-)
-ENGINE = MyISAM;
+) ENGINE = MyISAM;
# Course Album Table
CREATE TABLE `pa_course_album` (
`course_id` INTEGER UNSIGNED,
`album_id` INTEGER UNSIGNED,
PRIMARY KEY (`course_id`, `album_id`)
-)
-ENGINE = MyISAM;
+) ENGINE = MyISAM;
# Photo Album Comments
CREATE TABLE `pa_album_comments` (
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`album_id` INTEGER UNSIGNED NOT NULL,
`member_id` INTEGER UNSIGNED NOT NULL,
- `comment` TEXT NOT NULL,
+ `comment` TEXT,
`created_date` DATETIME NOT NULL,
PRIMARY KEY (`id`)
-)
-ENGINE = MyISAM;
+) ENGINE = MyISAM;
# Photo Comments
CREATE TABLE `pa_photo_comments` (
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`photo_id` INTEGER UNSIGNED NOT NULL,
`member_id` INTEGER UNSIGNED NOT NULL,
- `comment` TEXT NOT NULL,
+ `comment` TEXT,
`created_date` DATETIME NOT NULL,
PRIMARY KEY (`id`)
-)
-ENGINE = MyISAM;
+) ENGINE = MyISAM;
# Initiali Config
INSERT INTO `config` VALUES ('pa_max_memory_per_member', '50');