diff --git a/app/Migrations/Schema/V111/Version111.php b/app/Migrations/Schema/V111/Version111.php index 38363995ef..2698aaf1b3 100644 --- a/app/Migrations/Schema/V111/Version111.php +++ b/app/Migrations/Schema/V111/Version111.php @@ -144,8 +144,20 @@ class Version111 extends AbstractMigrationChamilo $this->addSql('UPDATE plugin_ticket_ticket t INNER JOIN plugin_ticket_message as m ON(t.ticket_id = m.ticket_id and message_id =1) SET t.subject = m.subject'); $this->addSql('UPDATE plugin_ticket_ticket t INNER JOIN plugin_ticket_message as m ON(t.ticket_id = m.ticket_id and message_id =1) SET t.message = m.message'); $this->addSql('DELETE FROM plugin_ticket_message WHERE message_id = 1'); + + $this->addSql('RENAME TABLE plugin_ticket_assigned_log TO ticket_assigned_log'); + $this->addSql('RENAME TABLE plugin_ticket_category TO ticket_category'); + $this->addSql('RENAME TABLE plugin_ticket_category_rel_user TO ticket_category_rel_user'); + $this->addSql('RENAME TABLE plugin_ticket_message TO ticket_message'); + $this->addSql('RENAME TABLE plugin_ticket_message_attachments TO ticket_message_attachments'); + $this->addSql('RENAME TABLE plugin_ticket_priority TO ticket_priority'); + $this->addSql('RENAME TABLE plugin_ticket_project TO ticket_project'); + $this->addSql('RENAME TABLE plugin_ticket_status TO ticket_status'); + $this->addSql('RENAME TABLE plugin_ticket_ticket TO ticket_ticket'); } -} /** + } + + /** * @param Schema $schema */ public function postUp(Schema $schema) diff --git a/main/inc/lib/database.lib.php b/main/inc/lib/database.lib.php index 93287ff9a8..300ccead8a 100755 --- a/main/inc/lib/database.lib.php +++ b/main/inc/lib/database.lib.php @@ -127,8 +127,8 @@ class Database * @param string $entityRootPath * * @throws \Doctrine\ORM\ORMException - * - * @return + * + * @return */ public function connect($params = array(), $sysPath = '', $entityRootPath = '', $returnConnection = false) { @@ -140,7 +140,8 @@ class Database 'ChamiloUserBundle' => 'Chamilo\UserBundle\Entity', 'ChamiloCoreBundle' => 'Chamilo\CoreBundle\Entity', 'ChamiloCourseBundle' => 'Chamilo\CourseBundle\Entity', - 'ChamiloSkillBundle' => 'Chamilo\SkillBundle\Entity' + 'ChamiloSkillBundle' => 'Chamilo\SkillBundle\Entity', + 'ChamiloTicketBundle' => 'Chamilo\TicketBundle\Entity' ) ); @@ -178,7 +179,7 @@ class Database $listener = new \Gedmo\Sortable\SortableListener(); $entityManager->getEventManager()->addEventSubscriber($listener); $connection = $entityManager->getConnection(); - + $connection->executeQuery('SET sql_mode = "";'); if ($returnConnection) { return $connection; } @@ -660,6 +661,7 @@ class Database $path.'src/Chamilo/CoreBundle/Entity', $path.'src/Chamilo/UserBundle/Entity', $path.'src/Chamilo/CourseBundle/Entity', + $path.'src/Chamilo/TicketBundle/Entity', //$path.'vendor/sonata-project/user-bundle/Entity', //$path.'vendor/sonata-project/user-bundle/Model', //$path.'vendor/friendsofsymfony/user-bundle/FOS/UserBundle/Entity', @@ -692,7 +694,7 @@ class Database * @param string $table * @return \Doctrine\DBAL\Schema\Column[] */ - public static function listTableColumns($table) + public static function listTableColumns($table) { return self::getManager()->getConnection()->getSchemaManager()->listTableColumns($table); } diff --git a/src/Chamilo/TicketBundle/Entities/AssignedLog.php b/src/Chamilo/TicketBundle/Entities/AssignedLog.php deleted file mode 100644 index 43148607f6..0000000000 --- a/src/Chamilo/TicketBundle/Entities/AssignedLog.php +++ /dev/null @@ -1,202 +0,0 @@ -getName(); - } - - /** - * @return int - */ - public function getId() - { - return $this->id; - } - - /** - * @param int $id - * @return Level - */ - public function setId($id) - { - $this->id = $id; - - return $this; - } - - /** - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * @param string $name - * @return Level - */ - public function setName($name) - { - $this->name = $name; - - return $this; - } - - /** - * @return mixed - */ - public function getPosition() - { - return $this->position; - } - - /** - * @param mixed $position - * @return Level - */ - public function setPosition($position) - { - $this->position = $position; - - return $this; - } - - /** - * @return mixed - */ - public function getShortName() - { - return $this->shortName; - } - - /** - * @param mixed $shortName - * @return Level - */ - public function setShortName($shortName) - { - $this->shortName = $shortName; - - return $this; - } - - /** - * @return Profile - */ - public function getProfile() - { - return $this->profile; - } - - /** - * @param mixed $profile - * @return Level - */ - public function setProfile($profile) - { - $this->profile = $profile; - - return $this; - } - - -} diff --git a/src/Chamilo/TicketBundle/Entities/Category.php b/src/Chamilo/TicketBundle/Entities/Category.php deleted file mode 100644 index ffd94c0ccd..0000000000 --- a/src/Chamilo/TicketBundle/Entities/Category.php +++ /dev/null @@ -1,202 +0,0 @@ -getName(); - } - - /** - * @return int - */ - public function getId() - { - return $this->id; - } - - /** - * @param int $id - * @return Level - */ - public function setId($id) - { - $this->id = $id; - - return $this; - } - - /** - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * @param string $name - * @return Level - */ - public function setName($name) - { - $this->name = $name; - - return $this; - } - - /** - * @return mixed - */ - public function getPosition() - { - return $this->position; - } - - /** - * @param mixed $position - * @return Level - */ - public function setPosition($position) - { - $this->position = $position; - - return $this; - } - - /** - * @return mixed - */ - public function getShortName() - { - return $this->shortName; - } - - /** - * @param mixed $shortName - * @return Level - */ - public function setShortName($shortName) - { - $this->shortName = $shortName; - - return $this; - } - - /** - * @return Profile - */ - public function getProfile() - { - return $this->profile; - } - - /** - * @param mixed $profile - * @return Level - */ - public function setProfile($profile) - { - $this->profile = $profile; - - return $this; - } - - -} diff --git a/src/Chamilo/TicketBundle/Entities/Message.php b/src/Chamilo/TicketBundle/Entities/Message.php deleted file mode 100644 index 821fbe3ed6..0000000000 --- a/src/Chamilo/TicketBundle/Entities/Message.php +++ /dev/null @@ -1,197 +0,0 @@ -getName(); - } - - /** - * @return int - */ - public function getId() - { - return $this->id; - } - - /** - * @param int $id - * @return Level - */ - public function setId($id) - { - $this->id = $id; - - return $this; - } - - /** - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * @param string $name - * @return Level - */ - public function setName($name) - { - $this->name = $name; - - return $this; - } - - /** - * @return mixed - */ - public function getPosition() - { - return $this->position; - } - - /** - * @param mixed $position - * @return Level - */ - public function setPosition($position) - { - $this->position = $position; - - return $this; - } - - /** - * @return mixed - */ - public function getShortName() - { - return $this->shortName; - } - - /** - * @param mixed $shortName - * @return Level - */ - public function setShortName($shortName) - { - $this->shortName = $shortName; - - return $this; - } - - /** - * @return Profile - */ - public function getProfile() - { - return $this->profile; - } - - /** - * @param mixed $profile - * @return Level - */ - public function setProfile($profile) - { - $this->profile = $profile; - - return $this; - } - - -} diff --git a/src/Chamilo/TicketBundle/Entities/Priority.php b/src/Chamilo/TicketBundle/Entities/Priority.php deleted file mode 100644 index b91addafe6..0000000000 --- a/src/Chamilo/TicketBundle/Entities/Priority.php +++ /dev/null @@ -1,197 +0,0 @@ -getName(); - } - - /** - * @return int - */ - public function getId() - { - return $this->id; - } - - /** - * @param int $id - * @return Level - */ - public function setId($id) - { - $this->id = $id; - - return $this; - } - - /** - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * @param string $name - * @return Level - */ - public function setName($name) - { - $this->name = $name; - - return $this; - } - - /** - * @return mixed - */ - public function getPosition() - { - return $this->position; - } - - /** - * @param mixed $position - * @return Level - */ - public function setPosition($position) - { - $this->position = $position; - - return $this; - } - - /** - * @return mixed - */ - public function getShortName() - { - return $this->shortName; - } - - /** - * @param mixed $shortName - * @return Level - */ - public function setShortName($shortName) - { - $this->shortName = $shortName; - - return $this; - } - - /** - * @return Profile - */ - public function getProfile() - { - return $this->profile; - } - - /** - * @param mixed $profile - * @return Level - */ - public function setProfile($profile) - { - $this->profile = $profile; - - return $this; - } - - -} diff --git a/src/Chamilo/TicketBundle/Entities/Status.php b/src/Chamilo/TicketBundle/Entities/Status.php deleted file mode 100644 index 45d72d196e..0000000000 --- a/src/Chamilo/TicketBundle/Entities/Status.php +++ /dev/null @@ -1,148 +0,0 @@ -getName(); - } - - /** - * @return int - */ - public function getId() - { - return $this->id; - } - - /** - * @param int $id - * @return Level - */ - public function setId($id) - { - $this->id = $id; - - return $this; - } - - /** - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * @param string $name - * @return Level - */ - public function setName($name) - { - $this->name = $name; - - return $this; - } - - /** - * @return mixed - */ - public function getPosition() - { - return $this->position; - } - - /** - * @param mixed $position - * @return Level - */ - public function setPosition($position) - { - $this->position = $position; - - return $this; - } - - /** - * @return mixed - */ - public function getShortName() - { - return $this->shortName; - } - - /** - * @param mixed $shortName - * @return Level - */ - public function setShortName($shortName) - { - $this->shortName = $shortName; - - return $this; - } - - /** - * @return Profile - */ - public function getProfile() - { - return $this->profile; - } - - /** - * @param mixed $profile - * @return Level - */ - public function setProfile($profile) - { - $this->profile = $profile; - - return $this; - } - - -} diff --git a/src/Chamilo/TicketBundle/Entities/TicketProject.php b/src/Chamilo/TicketBundle/Entities/TicketProject.php deleted file mode 100644 index cc6817eaa4..0000000000 --- a/src/Chamilo/TicketBundle/Entities/TicketProject.php +++ /dev/null @@ -1,199 +0,0 @@ -getName(); - } - - /** - * @return int - */ - public function getId() - { - return $this->id; - } - - /** - * @param int $id - * @return Level - */ - public function setId($id) - { - $this->id = $id; - - return $this; - } - - /** - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * @param string $name - * @return Level - */ - public function setName($name) - { - $this->name = $name; - - return $this; - } - - /** - * @return mixed - */ - public function getPosition() - { - return $this->position; - } - - /** - * @param mixed $position - * @return Level - */ - public function setPosition($position) - { - $this->position = $position; - - return $this; - } - - /** - * @return mixed - */ - public function getShortName() - { - return $this->shortName; - } - - /** - * @param mixed $shortName - * @return Level - */ - public function setShortName($shortName) - { - $this->shortName = $shortName; - - return $this; - } - - /** - * @return Profile - */ - public function getProfile() - { - return $this->profile; - } - - /** - * @param mixed $profile - * @return Level - */ - public function setProfile($profile) - { - $this->profile = $profile; - - return $this; - } - - -} diff --git a/src/Chamilo/TicketBundle/Entity/AssignedLog.php b/src/Chamilo/TicketBundle/Entity/AssignedLog.php new file mode 100644 index 0000000000..b7edf9892f --- /dev/null +++ b/src/Chamilo/TicketBundle/Entity/AssignedLog.php @@ -0,0 +1,57 @@ +getName(); - } - - /** - * @return int - */ - public function getId() - { - return $this->id; - } - - /** - * @param int $id - * @return Level - */ - public function setId($id) - { - $this->id = $id; - - return $this; - } - - /** - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * @param string $name - * @return Level - */ - public function setName($name) - { - $this->name = $name; - - return $this; - } - - /** - * @return mixed - */ - public function getPosition() - { - return $this->position; - } - - /** - * @param mixed $position - * @return Level - */ - public function setPosition($position) - { - $this->position = $position; - - return $this; - } - - /** - * @return mixed - */ - public function getShortName() - { - return $this->shortName; - } - - /** - * @param mixed $shortName - * @return Level - */ - public function setShortName($shortName) - { - $this->shortName = $shortName; - - return $this; - } - - /** - * @return Profile - */ - public function getProfile() - { - return $this->profile; - } - - /** - * @param mixed $profile - * @return Level - */ - public function setProfile($profile) - { - $this->profile = $profile; - - return $this; - } - - }