Adding new session fields see BT#4874 (missing DB upgrade)

skala
Julio Montoya 12 years ago
parent 13d4ec33af
commit bf5041acfa
  1. 12
      main/install/db_main.sql
  2. 11
      main/install/migrate-db-1.9.0-1.10.0-pre.sql

@ -460,15 +460,17 @@ CREATE TABLE IF NOT EXISTS session (
name char(50) NOT NULL default '',
nbr_courses smallint unsigned NOT NULL default '0',
nbr_users mediumint unsigned NOT NULL default '0',
nbr_classes mediumint unsigned NOT NULL default '0',
date_start date NOT NULL default '0000-00-00',
date_end date NOT NULL default '0000-00-00',
nb_days_access_before_beginning TINYINT UNSIGNED NULL default '0',
nb_days_access_after_end TINYINT UNSIGNED NULL default '0',
nbr_classes mediumint unsigned NOT NULL default '0',
session_admin_id INT UNSIGNED NOT NULL,
visibility int NOT NULL default 1,
session_category_id int NOT NULL,
promotion_id INT NOT NULL,
display_start_date datetime NOT NULL default '0000-00-00 00:00:00',
display_end_date datetime NOT NULL default '0000-00-00 00:00:00',
access_start_date datetime NOT NULL default '0000-00-00 00:00:00',
access_end_date datetime NOT NULL default '0000-00-00 00:00:00',
coach_access_start_date datetime NOT NULL default '0000-00-00 00:00:00',
coach_access_end_date datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (id),
INDEX (session_admin_id),
UNIQUE KEY name (name)

@ -35,6 +35,17 @@ ALTER TABLE session_rel_user ADD COLUMN moved_status INT NOT NULL DEFAULT 0;
ALTER TABLE session_rel_user ADD COLUMN moved_at datetime NOT NULL default '0000-00-00 00:00:00';
ALTER TABLE session ADD COLUMN display_start_date datetime NOT NULL default '0000-00-00 00:00:00';
ALTER TABLE session ADD COLUMN display_end_date datetime NOT NULL default '0000-00-00 00:00:00';
ALTER TABLE session ADD COLUMN access_start_date datetime NOT NULL default '0000-00-00 00:00:00';
ALTER TABLE session ADD COLUMN access_end_date datetime NOT NULL default '0000-00-00 00:00:00';
ALTER TABLE session ADD COLUMN coach_access_start_date datetime NOT NULL default '0000-00-00 00:00:00';
ALTER TABLE session ADD COLUMN coach_access_end_date datetime NOT NULL default '0000-00-00 00:00:00';
-- ALTER TABLE session DROP COLUMN date_start;
-- ALTER TABLE session DROP COLUMN date_end;
-- Normal tables
UPDATE settings_current SET selected_value = '1.10.xx' WHERE variable = 'chamilo_database_version';

Loading…
Cancel
Save