Add status and update_at on skill table - refs BT#10181

1.10.x
Angel Fernando Quiroz Campos 10 years ago
parent 00bd96ffcc
commit d2f674b463
  1. 45
      app/Migrations/Schema/V110/Version20150819095300.php
  2. 56
      src/Chamilo/CoreBundle/Entity/Skill.php

@ -0,0 +1,45 @@
<?php
/* For licensing terms, see /license.txt */
namespace Application\Migrations\Schema\V110;
use Application\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;
/**
* Class Version20150819095300
*
* @package Application\Migrations\Schema\V11010
*/
class Version20150819095300 extends AbstractMigrationChamilo
{
/**
* @param Schema $schema
*/
public function up(Schema $schema)
{
$skillTable = $schema->getTable('skill');
$skillTable->addColumn(
'status',
\Doctrine\DBAL\Types\Type::INTEGER,
['default' => 1]
);
$skillTable->addColumn(
'updated_at',
\Doctrine\DBAL\Types\Type::DATETIME
);
}
/**
* @param Schema $schema
*/
public function down(Schema $schema)
{
$skillTable = $schema->getTable('skill');
$skillTable->dropColumn('status');
$skillTable->dropColumn('updated_at');
}
}

@ -54,6 +54,20 @@ class Skill
*/
private $criteria;
/**
* @var integer
*
* @ORM\Column(name="status", type="integer", nullable=false, options={"default": 1})
*/
private $status;
/**
* @var \DateTime
*
* @ORM\Column(name="updated_at", type="datetime", nullable=false)
*/
private $updatedAt;
/**
* @var integer
*
@ -203,6 +217,48 @@ class Skill
return $this->criteria;
}
/**
* Set status
* @param integer $status
* @return \Chamilo\CoreBundle\Entity\Skill
*/
public function setStatus($status)
{
$this->status = $status;
return $this;
}
/**
* Get status
* @return integer
*/
public function getStatus()
{
return $this->status;
}
/**
* Set updatedAt
* @param \DateTime $updatedAt The update datetime
* @return \Chamilo\CoreBundle\Entity\Skill
*/
public function setUpdatedAt(\DateTime $updatedAt)
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* Get updatedAt
* @return \DateTime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
/**
* Get id
*

Loading…
Cancel
Save