mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-27 00:55:01 +00:00
Clean migration for main bundle
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\Migrations\Main;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
final class Version20240918150339 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Set not null and defaults on columns. Drop customs column on address';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE chill_main_address DROP customs');
|
||||
$this->addSql('ALTER TABLE chill_main_dashboard_config_item ALTER metadata SET NOT NULL');
|
||||
$this->addSql('ALTER TABLE chill_main_location ALTER active SET NOT NULL');
|
||||
$this->addSql('ALTER TABLE chill_main_location_type ALTER active SET NOT NULL');
|
||||
$this->addSql('ALTER TABLE chill_main_location_type ALTER editablebyusers SET NOT NULL');
|
||||
$this->addSql('ALTER TABLE country ALTER name SET NOT NULL');
|
||||
$this->addSql('ALTER TABLE permission_groups ALTER name SET DEFAULT \'\'');
|
||||
$this->addSql('ALTER TABLE users ALTER attributes SET DEFAULT \'[]\'');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user