From 95973606cc07843586260d9d45a7f4cb8c391790 Mon Sep 17 00:00:00 2001 From: Julio Montoya <gugli100@gmail.com> Date: Fri, 3 Aug 2018 11:13:10 +0200 Subject: [PATCH] Add usergroup.author_id db change --- app/Migrations/Schema/V200/Version20.php | 5 +++++ src/CoreBundle/Entity/Usergroup.php | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Migrations/Schema/V200/Version20.php b/app/Migrations/Schema/V200/Version20.php index a6d454df54..d50c8b7347 100644 --- a/app/Migrations/Schema/V200/Version20.php +++ b/app/Migrations/Schema/V200/Version20.php @@ -579,6 +579,11 @@ class Version20 extends AbstractMigrationChamilo if (!$table->hasColumn('autolaunch')) { $this->addSql('ALTER TABLE c_quiz ADD autolaunch TINYINT(1) DEFAULT 0 NOT NULL'); } + + $table = $schema->getTable('usergroup'); + if (!$table->hasColumn('author_id')) { + $this->addSql('ALTER TABLE usergroup ADD author_id INT DEFAULT NULL'); + } } /** diff --git a/src/CoreBundle/Entity/Usergroup.php b/src/CoreBundle/Entity/Usergroup.php index 331b5b8d35..5af1874199 100644 --- a/src/CoreBundle/Entity/Usergroup.php +++ b/src/CoreBundle/Entity/Usergroup.php @@ -69,9 +69,9 @@ class Usergroup /** * @var string * - * ORM\Column(name="author_id", type="integer", nullable=true) + * @ORM\Column(name="author_id", type="integer", nullable=true) */ - //protected $authorId; + protected $authorId; /** * @var int