welcome back to dyb-tech
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20230831220137 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20230918201118 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20230918202500 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TABLE facility (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) DEFAULT NULL, address VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE file (id INT AUTO_INCREMENT NOT NULL, game_id INT DEFAULT NULL, player_id INT DEFAULT NULL, name VARCHAR(255) DEFAULT NULL, type VARCHAR(255) DEFAULT NULL, created_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_8C9F3610E48FD905 (game_id), INDEX IDX_8C9F361099E6F5DF (player_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE game (id INT AUTO_INCREMENT NOT NULL, season_id INT DEFAULT NULL, facility_id INT DEFAULT NULL, home_team_id INT DEFAULT NULL, away_team_id INT DEFAULT NULL, points_home INT DEFAULT NULL, points_away INT DEFAULT NULL, planned_date DATETIME DEFAULT NULL, game_date_time DATETIME DEFAULT NULL, notes VARCHAR(350) DEFAULT NULL, INDEX IDX_232B318C4EC001D1 (season_id), INDEX IDX_232B318CA7014910 (facility_id), INDEX IDX_232B318C9C4C13F6 (home_team_id), INDEX IDX_232B318C45185D02 (away_team_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE league (id INT AUTO_INCREMENT NOT NULL, president_id INT DEFAULT NULL, name VARCHAR(255) DEFAULT NULL, logo VARCHAR(255) DEFAULT NULL, description VARCHAR(255) DEFAULT NULL, active TINYINT(1) DEFAULT NULL, created_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', points_per_win INT DEFAULT NULL, points_per_draw INT DEFAULT NULL, UNIQUE INDEX UNIQ_3EB4C318B40A33C7 (president_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE log (id INT AUTO_INCREMENT NOT NULL, payload JSON DEFAULT NULL, code INT DEFAULT NULL, message VARCHAR(550) DEFAULT NULL, created_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE player (id INT AUTO_INCREMENT NOT NULL, team_id INT DEFAULT NULL, first_name VARCHAR(255) DEFAULT NULL, last_name VARCHAR(255) DEFAULT NULL, position VARCHAR(255) DEFAULT NULL, jersey_number SMALLINT DEFAULT NULL, is_federated TINYINT(1) DEFAULT NULL, picture_file_name VARCHAR(255) DEFAULT NULL, birthday DATE DEFAULT NULL, INDEX IDX_98197A65296CD8AE (team_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE season (id INT AUTO_INCREMENT NOT NULL, league_id INT DEFAULT NULL, date_start DATE NOT NULL, date_end DATE DEFAULT NULL, active TINYINT(1) DEFAULT NULL, created_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_F0E45BA958AFC4DE (league_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE season_team (season_id INT NOT NULL, team_id INT NOT NULL, INDEX IDX_42A93A814EC001D1 (season_id), INDEX IDX_42A93A81296CD8AE (team_id), PRIMARY KEY(season_id, team_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE season_data (id INT AUTO_INCREMENT NOT NULL, team_id INT DEFAULT NULL, season_id INT DEFAULT NULL, captain_id INT DEFAULT NULL, points INT DEFAULT NULL, INDEX IDX_2BBA6FFD296CD8AE (team_id), INDEX IDX_2BBA6FFD4EC001D1 (season_id), INDEX IDX_2BBA6FFD3346729B (captain_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE team (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) DEFAULT NULL, active TINYINT(1) DEFAULT NULL, created_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, email VARCHAR(180) NOT NULL, roles JSON NOT NULL, password VARCHAR(255) NOT NULL, first_name VARCHAR(255) DEFAULT NULL, last_name VARCHAR(255) DEFAULT NULL, phone VARCHAR(255) DEFAULT NULL, profile_picture VARCHAR(255) DEFAULT NULL, birthday DATE DEFAULT NULL, active TINYINT(1) DEFAULT NULL, created_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', UNIQUE INDEX UNIQ_8D93D649E7927C74 (email), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('ALTER TABLE file ADD CONSTRAINT FK_8C9F3610E48FD905 FOREIGN KEY (game_id) REFERENCES game (id)');
|
||||
$this->addSql('ALTER TABLE file ADD CONSTRAINT FK_8C9F361099E6F5DF FOREIGN KEY (player_id) REFERENCES player (id)');
|
||||
$this->addSql('ALTER TABLE game ADD CONSTRAINT FK_232B318C4EC001D1 FOREIGN KEY (season_id) REFERENCES season (id)');
|
||||
$this->addSql('ALTER TABLE game ADD CONSTRAINT FK_232B318CA7014910 FOREIGN KEY (facility_id) REFERENCES facility (id)');
|
||||
$this->addSql('ALTER TABLE game ADD CONSTRAINT FK_232B318C9C4C13F6 FOREIGN KEY (home_team_id) REFERENCES team (id)');
|
||||
$this->addSql('ALTER TABLE game ADD CONSTRAINT FK_232B318C45185D02 FOREIGN KEY (away_team_id) REFERENCES team (id)');
|
||||
$this->addSql('ALTER TABLE league ADD CONSTRAINT FK_3EB4C318B40A33C7 FOREIGN KEY (president_id) REFERENCES user (id)');
|
||||
$this->addSql('ALTER TABLE player ADD CONSTRAINT FK_98197A65296CD8AE FOREIGN KEY (team_id) REFERENCES team (id)');
|
||||
$this->addSql('ALTER TABLE season ADD CONSTRAINT FK_F0E45BA958AFC4DE FOREIGN KEY (league_id) REFERENCES league (id)');
|
||||
$this->addSql('ALTER TABLE season_team ADD CONSTRAINT FK_42A93A814EC001D1 FOREIGN KEY (season_id) REFERENCES season (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE season_team ADD CONSTRAINT FK_42A93A81296CD8AE FOREIGN KEY (team_id) REFERENCES team (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE season_data ADD CONSTRAINT FK_2BBA6FFD296CD8AE FOREIGN KEY (team_id) REFERENCES team (id)');
|
||||
$this->addSql('ALTER TABLE season_data ADD CONSTRAINT FK_2BBA6FFD4EC001D1 FOREIGN KEY (season_id) REFERENCES season (id)');
|
||||
$this->addSql('ALTER TABLE season_data ADD CONSTRAINT FK_2BBA6FFD3346729B FOREIGN KEY (captain_id) REFERENCES user (id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE file DROP FOREIGN KEY FK_8C9F3610E48FD905');
|
||||
$this->addSql('ALTER TABLE file DROP FOREIGN KEY FK_8C9F361099E6F5DF');
|
||||
$this->addSql('ALTER TABLE game DROP FOREIGN KEY FK_232B318C4EC001D1');
|
||||
$this->addSql('ALTER TABLE game DROP FOREIGN KEY FK_232B318CA7014910');
|
||||
$this->addSql('ALTER TABLE game DROP FOREIGN KEY FK_232B318C9C4C13F6');
|
||||
$this->addSql('ALTER TABLE game DROP FOREIGN KEY FK_232B318C45185D02');
|
||||
$this->addSql('ALTER TABLE league DROP FOREIGN KEY FK_3EB4C318B40A33C7');
|
||||
$this->addSql('ALTER TABLE player DROP FOREIGN KEY FK_98197A65296CD8AE');
|
||||
$this->addSql('ALTER TABLE season DROP FOREIGN KEY FK_F0E45BA958AFC4DE');
|
||||
$this->addSql('ALTER TABLE season_team DROP FOREIGN KEY FK_42A93A814EC001D1');
|
||||
$this->addSql('ALTER TABLE season_team DROP FOREIGN KEY FK_42A93A81296CD8AE');
|
||||
$this->addSql('ALTER TABLE season_data DROP FOREIGN KEY FK_2BBA6FFD296CD8AE');
|
||||
$this->addSql('ALTER TABLE season_data DROP FOREIGN KEY FK_2BBA6FFD4EC001D1');
|
||||
$this->addSql('ALTER TABLE season_data DROP FOREIGN KEY FK_2BBA6FFD3346729B');
|
||||
$this->addSql('DROP TABLE facility');
|
||||
$this->addSql('DROP TABLE file');
|
||||
$this->addSql('DROP TABLE game');
|
||||
$this->addSql('DROP TABLE league');
|
||||
$this->addSql('DROP TABLE log');
|
||||
$this->addSql('DROP TABLE player');
|
||||
$this->addSql('DROP TABLE season');
|
||||
$this->addSql('DROP TABLE season_team');
|
||||
$this->addSql('DROP TABLE season_data');
|
||||
$this->addSql('DROP TABLE team');
|
||||
$this->addSql('DROP TABLE user');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20231007212245 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE user ADD note_list LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\'');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE user DROP note_list');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20231007221519 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE season_data DROP FOREIGN KEY FK_2BBA6FFD3346729B');
|
||||
$this->addSql('DROP INDEX IDX_2BBA6FFD3346729B ON season_data');
|
||||
$this->addSql('ALTER TABLE season_data DROP captain_id');
|
||||
$this->addSql('ALTER TABLE team ADD captain_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE team ADD CONSTRAINT FK_CAPTAIN_ID FOREIGN KEY (captain_id) REFERENCES user (id)');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_CAPTAIN_ID ON team (captain_id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE season_data ADD captain_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE season_data ADD CONSTRAINT FK_2BBA6FFD3346729B FOREIGN KEY (captain_id) REFERENCES user (id)');
|
||||
$this->addSql('CREATE INDEX IDX_2BBA6FFD3346729B ON season_data (captain_id)');
|
||||
$this->addSql('ALTER TABLE team DROP FOREIGN KEY FK_C4E0A61F3346729B');
|
||||
$this->addSql('DROP INDEX UNIQ_C4E0A61F3346729B ON team');
|
||||
$this->addSql('ALTER TABLE team DROP captain_id');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20231007222620 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE league ADD city VARCHAR(255) DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE team RENAME INDEX uniq_captain_id TO UNIQ_C4E0A61F3346729B');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE league DROP city');
|
||||
$this->addSql('ALTER TABLE team RENAME INDEX uniq_c4e0a61f3346729b TO UNIQ_CAPTAIN_ID');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20231007223332 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE league ADD points_per_loss INT DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE league DROP points_per_loss');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20231108232033 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE facility ADD season_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE facility ADD CONSTRAINT FK_105994B24EC001D1 FOREIGN KEY (season_id) REFERENCES season (id)');
|
||||
$this->addSql('CREATE INDEX IDX_105994B24EC001D1 ON facility (season_id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE facility DROP FOREIGN KEY FK_105994B24EC001D1');
|
||||
$this->addSql('DROP INDEX IDX_105994B24EC001D1 ON facility');
|
||||
$this->addSql('ALTER TABLE facility DROP season_id');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20231109001241 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE facility ADD created_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\'');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE facility DROP created_at');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240208210630 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TABLE notification (id INT AUTO_INCREMENT NOT NULL, requesting_user_id INT DEFAULT NULL, league_id INT DEFAULT NULL, type VARCHAR(255) DEFAULT NULL, message VARCHAR(280) DEFAULT NULL, is_accepted TINYINT(1) DEFAULT NULL, created_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', team_id INT DEFAULT NULL, INDEX IDX_BF5476CA2A841BBC (requesting_user_id), INDEX IDX_BF5476CA58AFC4DE (league_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('ALTER TABLE notification ADD CONSTRAINT FK_NOTIFICATION_REQUESTING_USER_ID FOREIGN KEY (requesting_user_id) REFERENCES user (id)');
|
||||
$this->addSql('ALTER TABLE notification ADD CONSTRAINT FK_NOTIFICATION_LEAGUE_ID FOREIGN KEY (league_id) REFERENCES league (id)');
|
||||
$this->addSql('ALTER TABLE league ADD matches_between_teams INT DEFAULT NULL, ADD blocked_match_dates JSON DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE log CHANGE payload payload LONGTEXT DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE notification DROP FOREIGN KEY FK_NOTIFICATION_REQUESTING_USER_ID');
|
||||
$this->addSql('ALTER TABLE notification DROP FOREIGN KEY FK_NOTIFICATION_LEAGUE_ID');
|
||||
$this->addSql('DROP TABLE notification');
|
||||
$this->addSql('ALTER TABLE league DROP matches_between_teams, DROP blocked_match_dates');
|
||||
$this->addSql('ALTER TABLE log CHANGE payload payload JSON DEFAULT NULL');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240210215035 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE season DROP date_end');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE season ADD date_end DATE DEFAULT NULL');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240210230354 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TABLE custom_role (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, name VARCHAR(255) DEFAULT NULL, created_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_USER_ID (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('ALTER TABLE custom_role ADD CONSTRAINT FK_CUSTOM_ROLE_USER FOREIGN KEY (user_id) REFERENCES user (id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE custom_role DROP FOREIGN KEY FK_CUSTOM_ROLE_USER');
|
||||
$this->addSql('DROP TABLE custom_role');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240210231643 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE custom_role RENAME INDEX idx_user_id TO IDX_561F4297A76ED395');
|
||||
$this->addSql('ALTER TABLE season ADD updated_at DATETIME DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE custom_role RENAME INDEX idx_561f4297a76ed395 TO IDX_USER_ID');
|
||||
$this->addSql('ALTER TABLE season DROP updated_at');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240307211223 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE league DROP FOREIGN KEY FK_3EB4C318B40A33C7');
|
||||
$this->addSql('DROP INDEX UNIQ_3EB4C318B40A33C7 ON league');
|
||||
$this->addSql('ALTER TABLE league DROP president_id');
|
||||
$this->addSql('ALTER TABLE notification DROP FOREIGN KEY FK_NOTIFICATION_REQUESTING_USER_ID');
|
||||
$this->addSql('DROP INDEX IDX_BF5476CA2A841BBC ON notification');
|
||||
$this->addSql('ALTER TABLE notification ADD user_to_notify_id INT NOT NULL, CHANGE requesting_user_id user_who_fired_event_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE notification ADD CONSTRAINT FK_BF5476CA6EEF4E6F FOREIGN KEY (user_who_fired_event_id) REFERENCES user (id)');
|
||||
$this->addSql('ALTER TABLE notification ADD CONSTRAINT FK_BF5476CA64958C8F FOREIGN KEY (user_to_notify_id) REFERENCES user (id)');
|
||||
$this->addSql('CREATE INDEX IDX_BF5476CA6EEF4E6F ON notification (user_who_fired_event_id)');
|
||||
$this->addSql('CREATE INDEX IDX_BF5476CA64958C8F ON notification (user_to_notify_id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE league ADD president_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE league ADD CONSTRAINT FK_3EB4C318B40A33C7 FOREIGN KEY (president_id) REFERENCES user (id)');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_3EB4C318B40A33C7 ON league (president_id)');
|
||||
$this->addSql('ALTER TABLE notification DROP FOREIGN KEY FK_BF5476CA6EEF4E6F');
|
||||
$this->addSql('ALTER TABLE notification DROP FOREIGN KEY FK_BF5476CA64958C8F');
|
||||
$this->addSql('DROP INDEX IDX_BF5476CA6EEF4E6F ON notification');
|
||||
$this->addSql('DROP INDEX IDX_BF5476CA64958C8F ON notification');
|
||||
$this->addSql('ALTER TABLE notification DROP user_to_notify_id, CHANGE user_who_fired_event_id requesting_user_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE notification ADD CONSTRAINT FK_NOTIFICATION_REQUESTING_USER_ID FOREIGN KEY (requesting_user_id) REFERENCES user (id)');
|
||||
$this->addSql('CREATE INDEX IDX_BF5476CA2A841BBC ON notification (requesting_user_id)');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240310082537 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE notification ADD read_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', CHANGE is_accepted is_read TINYINT(1) DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE notification DROP read_at, CHANGE is_read is_accepted TINYINT(1) DEFAULT NULL');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240403225038 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE game ADD created_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', ADD updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\'');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE game DROP created_at, DROP updated_at');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240516234124 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE file ADD season_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE file ADD CONSTRAINT FK_8C9F36104EC001D1 FOREIGN KEY (season_id) REFERENCES season (id)');
|
||||
$this->addSql('CREATE INDEX IDX_8C9F36104EC001D1 ON file (season_id)');
|
||||
$this->addSql('ALTER TABLE league ADD is_public TINYINT(1) DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE file DROP FOREIGN KEY FK_8C9F36104EC001D1');
|
||||
$this->addSql('DROP INDEX IDX_8C9F36104EC001D1 ON file');
|
||||
$this->addSql('ALTER TABLE file DROP season_id');
|
||||
$this->addSql('ALTER TABLE league DROP is_public');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user