mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-04 13:54:59 +00:00
make somes changes on model: to manage isVisible field option + others
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\Migrations\Main;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
final class Version20211013124455 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'add location visible admin option';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE activitytype ADD locationVisible SMALLINT DEFAULT 1 NOT NULL');
|
||||
$this->addSql('ALTER TABLE activitytype ADD locationLabel VARCHAR(255) DEFAULT \'\' NOT NULL');
|
||||
|
||||
// fix old migration !?
|
||||
$this->addSql('ALTER TABLE activitytype ALTER category_id DROP DEFAULT');
|
||||
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE activitytype DROP locationVisible');
|
||||
$this->addSql('ALTER TABLE activitytype DROP locationLabel');
|
||||
|
||||
// fix old migration !?
|
||||
$this->addSql('ALTER TABLE activitytype ALTER category_id SET DEFAULT 1');
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user