-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Semaine type : répare la fonction de duplication d'un jour entier (#1043
) * PeriodPosition: add updated_at & updated_by * Period: improve isEmpty & isFull methods * Period: fix duplicate feature
- Loading branch information
Showing
6 changed files
with
255 additions
and
139 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
app/DoctrineMigrations/Version20231021183520_periodposition_updatedat_updatedby.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Application\Migrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
/** | ||
* Auto-generated Migration: Please modify to your needs! | ||
*/ | ||
final class Version20231021183520 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->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql('ALTER TABLE period_position ADD updated_by_id INT DEFAULT NULL, ADD updated_at DATETIME NOT NULL'); | ||
$this->addSql('ALTER TABLE period_position ADD CONSTRAINT FK_2367D496896DBBDE FOREIGN KEY (updated_by_id) REFERENCES fos_user (id)'); | ||
$this->addSql('CREATE INDEX IDX_2367D496896DBBDE ON period_position (updated_by_id)'); | ||
} | ||
|
||
public function down(Schema $schema) : void | ||
{ | ||
// this down() migration is auto-generated, please modify it to your needs | ||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql('ALTER TABLE period_position DROP FOREIGN KEY FK_2367D496896DBBDE'); | ||
$this->addSql('DROP INDEX IDX_2367D496896DBBDE ON period_position'); | ||
$this->addSql('ALTER TABLE period_position DROP updated_by_id, DROP updated_at'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.