Fix query errors by allowing null values.

1.10.x
Julio Montoya 10 years ago
parent 23df45a868
commit 073df40cb8
  1. 6
      main/install/database.sql
  2. 6
      main/install/migrate-db-1.9.0-1.10.0-pre.sql

@ -4233,7 +4233,7 @@ CREATE TABLE IF NOT EXISTS c_lp_item (
item_type char(32) not null default 'dokeos_document',
ref tinytext not null default '',
title varchar(511) not null,
description varchar(511) not null default '',
description varchar(511) default '',
path text not null,
min_score float unsigned not null default 0,
max_score float unsigned default 100,
@ -4470,7 +4470,7 @@ CREATE TABLE c_course_setting (
subkey varchar(255) default NULL,
type varchar(255) default NULL,
category varchar(255) default NULL,
value varchar(255) NOT NULL default '',
value varchar(255) default '',
title varchar(255) NOT NULL default '',
comment varchar(255) default NULL,
subkeytext varchar(255) default NULL,
@ -4729,5 +4729,5 @@ CREATE TABLE c_attendance_calendar_rel_group (
-- Version
LOCK TABLES settings_current WRITE;
UPDATE settings_current SET selected_value = '1.10.0.26' WHERE variable = 'chamilo_database_version';
UPDATE settings_current SET selected_value = '1.10.0.27' WHERE variable = 'chamilo_database_version';
UNLOCK TABLES;

@ -99,16 +99,18 @@ INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_ma
ALTER TABLE c_survey ADD COLUMN visible_results INT UNSIGNED DEFAULT 0;
ALTER TABLE c_survey_invitation ADD COLUMN group_id INT NOT NULL;
,
ALTER TABLE c_lp_item ADD COLUMN prerequisite_min_score float;
ALTER TABLE c_lp_item ADD COLUMN prerequisite_max_score float;
ALTER TABLE c_lp_item MODIFY COLUMN description VARCHAR(511) DEFAULT '';
ALTER TABLE c_student_publication ADD COLUMN document_id int DEFAULT 0;
ALTER TABLE c_group_info ADD COLUMN status tinyint DEFAULT 1;
ALTER TABLE c_course_setting MODIFY COLUMN value varchar(255) default '';
CREATE TABLE IF NOT EXISTS c_student_publication_rel_document (id INT PRIMARY KEY NOT NULL AUTO_INCREMENT, work_id INT NOT NULL, document_id INT NOT NULL, c_id INT NOT NULL);
CREATE TABLE IF NOT EXISTS c_student_publication_rel_user (id INT PRIMARY KEY NOT NULL AUTO_INCREMENT, work_id INT NOT NULL, user_id INT NOT NULL, c_id INT NOT NULL);
CREATE TABLE IF NOT EXISTS c_student_publication_comment (id INT PRIMARY KEY NOT NULL AUTO_INCREMENT, work_id INT NOT NULL, c_id INT NOT NULL, comment text, file VARCHAR(255), user_id int NOT NULL, sent_at datetime NOT NULL);
CREATE TABLE IF NOT EXISTS c_attendance_calendar_rel_group (id int NOT NULL auto_increment PRIMARY KEY, c_id INT NOT NULL, group_id INT NOT NULL, calendar_id INT NOT NULL);
-- Do not move this query
UPDATE settings_current SET selected_value = '1.10.0.26' WHERE variable = 'chamilo_database_version';
UPDATE settings_current SET selected_value = '1.10.0.27' WHERE variable = 'chamilo_database_version';

Loading…
Cancel
Save