Add DB changes from 1.11.x

c_group_info.document_access
c_group_category.document_access
c_quiz.auto_launch
pull/2528/head
jmontoyaa 7 years ago
parent cb44278c9f
commit 90d0f71aba
  1. 16
      app/Migrations/Schema/V200/Version20.php
  2. 7
      src/CourseBundle/Entity/CGroupCategory.php
  3. 7
      src/CourseBundle/Entity/CGroupInfo.php
  4. 8
      src/CourseBundle/Entity/CQuiz.php

@ -558,11 +558,27 @@ class Version20 extends AbstractMigrationChamilo
'ALTER TABLE sys_announcement ADD COLUMN visible_session_admin TINYINT(1) NOT NULL'
);
}
if ($table->hasColumn('visible_boss')) {
$this->addSql('ALTER TABLE sys_announcement CHANGE visible_boss visible_boss TINYINT(1) NOT NULL');
} else {
$this->addSql('ALTER TABLE sys_announcement ADD COLUMN visible_boss TINYINT(1) NOT NULL');
}
$table = $schema->getTable('c_group_info');
if (!$table->hasColumn('document_access')) {
$this->addSql('ALTER TABLE c_group_info ADD document_access INT DEFAULT 0 NOT NULL;');
}
$table = $schema->getTable('c_group_category');
if (!$table->hasColumn('document_access')) {
$this->addSql('ALTER TABLE c_group_category ADD document_access INT DEFAULT 0 NOT NULL;');
}
$table = $schema->getTable('c_quiz');
if (!$table->hasColumn('autolaunch')) {
$this->addSql('ALTER TABLE c_quiz ADD autolaunch TINYINT(1) DEFAULT 0 NOT NULL');
}
}
/**

@ -139,6 +139,13 @@ class CGroupCategory
*/
private $displayOrder;
/**
* @var int
*
* ORM\Column(name="doc_access", type="integer", nullable=false, options={"default":0})
*/
private $docAccess;
/**
* Set title.
*

@ -154,6 +154,13 @@ class CGroupInfo
*/
private $sessionId;
/**
* @var int
*
* ORM\Column(name="doc_access", type="integer", nullable=false, options={"default":0})
*/
private $docAccess;
/**
* Set name.
*

@ -223,6 +223,13 @@ class CQuiz
*/
private $notifications;
/**
* @var bool
*
* @ORM\Column(name="auto_launch", type="boolean", nullable=true, options={"default":0})
*/
private $autoLaunch;
/**
* CQuiz constructor.
*/
@ -231,6 +238,7 @@ class CQuiz
$this->hideQuestionTitle = false;
$this->showPreviousButton = true;
$this->notifications = '';
$this->autoLaunch = 0;
}
/**

Loading…
Cancel
Save