mirror of
https://github.com/tchapi/davis.git
synced 2025-01-17 21:08:17 +01:00
Add default value for calendarorder column following #35
This commit is contained in:
parent
cef0780a6f
commit
4f6fc9ed01
29
migrations/Version20210928132307.php
Normal file
29
migrations/Version20210928132307.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Add default value for calendar order.
|
||||
*/
|
||||
final class Version20210928132307 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Add default value for calendar order.';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE calendarinstances CHANGE calendarorder calendarorder INT DEFAULT 0 NOT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE calendarinstances CHANGE calendarorder calendarorder INT NOT NULL');
|
||||
}
|
||||
}
|
@ -66,7 +66,7 @@ class CalendarInstance
|
||||
private $description;
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="calendarorder", type="integer")
|
||||
* @ORM\Column(name="calendarorder", type="integer", options={"default" : 0})
|
||||
*/
|
||||
private $calendarOrder;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user