Replacing some smallint to int

skala
Julio Montoya 14 years ago
parent 182079bd18
commit b603b6978a
  1. 32
      main/inc/lib/add_course.lib.inc.php

@ -444,7 +444,7 @@ function create_course_tables($course_db_name = null) {
$sql = " $sql = "
CREATE TABLE `".$TABLETOOLANNOUNCEMENTS . "` ( CREATE TABLE `".$TABLETOOLANNOUNCEMENTS . "` (
$add_to_all_tables $add_to_all_tables
id mediumint unsigned NOT NULL auto_increment, id int unsigned NOT NULL auto_increment,
title text, title text,
content mediumtext, content mediumtext,
end_date date default NULL, end_date date default NULL,
@ -695,7 +695,7 @@ function create_course_tables($course_db_name = null) {
// Exercise tool - Tests/exercises // Exercise tool - Tests/exercises
$sql = "CREATE TABLE `".$TABLEQUIZ . "` ( $sql = "CREATE TABLE `".$TABLEQUIZ . "` (
$add_to_all_tables $add_to_all_tables
id mediumint unsigned NOT NULL auto_increment, id int unsigned NOT NULL auto_increment,
title varchar(255) NOT NULL, title varchar(255) NOT NULL,
description text default NULL, description text default NULL,
sound varchar(255) default NULL, sound varchar(255) default NULL,
@ -728,7 +728,7 @@ function create_course_tables($course_db_name = null) {
$sql = " $sql = "
CREATE TABLE `".$TABLEQUIZQUESTIONLIST . "` ( CREATE TABLE `".$TABLEQUIZQUESTIONLIST . "` (
$add_to_all_tables $add_to_all_tables
id mediumint unsigned NOT NULL auto_increment, id int unsigned NOT NULL auto_increment,
question TEXT NOT NULL, question TEXT NOT NULL,
description text default NULL, description text default NULL,
ponderation float(6,2) NOT NULL default 0, ponderation float(6,2) NOT NULL default 0,
@ -748,8 +748,8 @@ function create_course_tables($course_db_name = null) {
$sql = " $sql = "
CREATE TABLE `".$TABLEQUIZANSWERSLIST . "` ( CREATE TABLE `".$TABLEQUIZANSWERSLIST . "` (
$add_to_all_tables $add_to_all_tables
id mediumint unsigned NOT NULL, id int unsigned NOT NULL,
question_id mediumint unsigned NOT NULL, question_id int unsigned NOT NULL,
answer text NOT NULL, answer text NOT NULL,
correct mediumint unsigned default NULL, correct mediumint unsigned default NULL,
comment text default NULL, comment text default NULL,
@ -781,9 +781,9 @@ function create_course_tables($course_db_name = null) {
$sql = " $sql = "
CREATE TABLE `".$TABLEQUIZQUESTION . "` ( CREATE TABLE `".$TABLEQUIZQUESTION . "` (
$add_to_all_tables $add_to_all_tables
question_id mediumint unsigned NOT NULL, question_id int unsigned NOT NULL,
exercice_id mediumint unsigned NOT NULL, exercice_id int unsigned NOT NULL,
question_order mediumint unsigned NOT NULL default 1, question_order int unsigned NOT NULL default 1,
PRIMARY KEY (c_id, question_id,exercice_id) PRIMARY KEY (c_id, question_id,exercice_id)
)" . $charset_clause; )" . $charset_clause;
Database::query($sql); Database::query($sql);
@ -814,7 +814,7 @@ function create_course_tables($course_db_name = null) {
$sql = " $sql = "
CREATE TABLE `".$TABLETOOLCOURSEDESC . "` ( CREATE TABLE `".$TABLETOOLCOURSEDESC . "` (
$add_to_all_tables $add_to_all_tables
id TINYINT UNSIGNED NOT NULL auto_increment, id int UNSIGNED NOT NULL auto_increment,
title VARCHAR(255), title VARCHAR(255),
content TEXT, content TEXT,
session_id int default 0, session_id int default 0,
@ -1519,7 +1519,7 @@ function create_course_tables($course_db_name = null) {
comment longtext NOT NULL , comment longtext NOT NULL ,
author_id int NOT NULL default 0, author_id int NOT NULL default 0,
date_creation datetime NOT NULL default '0000-00-00 00:00:00', date_creation datetime NOT NULL default '0000-00-00 00:00:00',
blog_id mediumint NOT NULL default 0, blog_id int NOT NULL default 0,
post_id int NOT NULL default 0, post_id int NOT NULL default 0,
task_id int default NULL , task_id int default NULL ,
parent_comment_id int NOT NULL default 0, parent_comment_id int NOT NULL default 0,
@ -1537,7 +1537,7 @@ function create_course_tables($course_db_name = null) {
title varchar( 250 ) NOT NULL default '', title varchar( 250 ) NOT NULL default '',
full_text longtext NOT NULL , full_text longtext NOT NULL ,
date_creation datetime NOT NULL default '0000-00-00 00:00:00', date_creation datetime NOT NULL default '0000-00-00 00:00:00',
blog_id mediumint NOT NULL default 0, blog_id int NOT NULL default 0,
author_id int NOT NULL default 0, author_id int NOT NULL default 0,
PRIMARY KEY (c_id, post_id ) PRIMARY KEY (c_id, post_id )
)" . $charset_clause . " COMMENT = 'Table with posts / blog.';"; )" . $charset_clause . " COMMENT = 'Table with posts / blog.';";
@ -1554,7 +1554,7 @@ function create_course_tables($course_db_name = null) {
rating_type enum( 'post', 'comment' ) NOT NULL default 'post', rating_type enum( 'post', 'comment' ) NOT NULL default 'post',
item_id int NOT NULL default 0, item_id int NOT NULL default 0,
user_id int NOT NULL default 0, user_id int NOT NULL default 0,
rating mediumint NOT NULL default 0, rating int NOT NULL default 0,
PRIMARY KEY (c_id, rating_id ) PRIMARY KEY (c_id, rating_id )
)" . $charset_clause . " COMMENT = 'Table with ratings for post/comments in a certain blog';"; )" . $charset_clause . " COMMENT = 'Table with ratings for post/comments in a certain blog';";
@ -1577,8 +1577,8 @@ function create_course_tables($course_db_name = null) {
$sql = " $sql = "
CREATE TABLE `" . $tbl_blogs_tasks . "` ( CREATE TABLE `" . $tbl_blogs_tasks . "` (
$add_to_all_tables $add_to_all_tables
task_id mediumint NOT NULL AUTO_INCREMENT , task_id int NOT NULL AUTO_INCREMENT ,
blog_id mediumint NOT NULL default 0, blog_id int NOT NULL default 0,
title varchar( 250 ) NOT NULL default '', title varchar( 250 ) NOT NULL default '',
description text NOT NULL , description text NOT NULL ,
color varchar( 10 ) NOT NULL default '', color varchar( 10 ) NOT NULL default '',
@ -1593,9 +1593,9 @@ function create_course_tables($course_db_name = null) {
$sql = " $sql = "
CREATE TABLE `" . $tbl_blogs_tasks_rel_user . "` ( CREATE TABLE `" . $tbl_blogs_tasks_rel_user . "` (
$add_to_all_tables $add_to_all_tables
blog_id mediumint NOT NULL default 0, blog_id int NOT NULL default 0,
user_id int NOT NULL default 0, user_id int NOT NULL default 0,
task_id mediumint NOT NULL default 0, task_id int NOT NULL default 0,
target_date date NOT NULL default '0000-00-00', target_date date NOT NULL default '0000-00-00',
PRIMARY KEY (c_id, blog_id , user_id , task_id ) PRIMARY KEY (c_id, blog_id , user_id , task_id )
)" . $charset_clause . " COMMENT = 'Table with tasks assigned to a user in a blog';"; )" . $charset_clause . " COMMENT = 'Table with tasks assigned to a user in a blog';";

Loading…
Cancel
Save