Creating new tables for the "usergroup" feature se BT#1910

skala
Julio Montoya 14 years ago
parent 082978f6d9
commit b53ccb8197
  1. 24
      main/install/db_main.sql
  2. 8
      main/install/migrate-db-1.8.7-1.8.8-pre.sql

@ -2547,8 +2547,6 @@ CREATE TABLE career (
PRIMARY KEY (id)
);
CREATE TABLE promotion (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL ,
@ -2557,3 +2555,25 @@ CREATE TABLE promotion (
PRIMARY KEY(id)
);
CREATE TABLE usergroup (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
description TEXT NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE usergroup_rel_user (
usergroup_id INT NOT NULL,
user_id INT NOT NULL
);
CREATE TABLE usergroup_rel_course (
usergroup_id INT NOT NULL,
course_id INT NOT NULL
);
CREATE TABLE usergroup_rel_session (
usergroup_id INT NOT NULL,
session_id INT NOT NULL
);

@ -174,6 +174,12 @@ INSERT INTO course_setting(variable,value,category) VALUES ('enable_lp_auto_laun
INSERT INTO course_setting(variable,value,category) VALUES ('pdf_export_watermark_text','','course');
CREATE TABLE career ( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL ,description TEXT NOT NULL,PRIMARY KEY (id));
CREATE TABLE career (id INT NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL, description TEXT NOT NULL,PRIMARY KEY (id));
CREATE TABLE promotion (id INT NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL, description TEXT NOT NULL, career_id INT NOT NULL,PRIMARY KEY(id));
ALTER TABLE session ADD promotion_id INT NOT NULL;
CREATE TABLE usergroup ( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL, description TEXT NOT NULL,PRIMARY KEY (id));
CREATE TABLE usergroup_rel_user ( usergroup_id INT NOT NULL, user_id INT NOT NULL );
CREATE TABLE usergroup_rel_course ( usergroup_id INT NOT NULL, course_id INT NOT NULL );
CREATE TABLE usergroup_rel_session ( usergroup_id INT NOT NULL, session_id INT NOT NULL );

Loading…
Cancel
Save