-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
485 additions
and
52 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace DoctrineMigrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
final class Version20230726230348 extends AbstractMigration | ||
{ | ||
public function getDescription(): string | ||
{ | ||
return 'Rename development_kit table to film_developments'; | ||
} | ||
|
||
public function up(Schema $schema): void | ||
{ | ||
$this->addSql('ALTER TABLE film_developments DROP CONSTRAINT fk_50b275403a8e60ef'); | ||
$this->addSql('CREATE TABLE development_kits (id VARCHAR(36) NOT NULL, name VARCHAR(128) NOT NULL, type VARCHAR(255) NOT NULL, untracked_developments INT DEFAULT 0 NOT NULL, development_times__first_developer_time DOUBLE PRECISION NOT NULL, development_times__first_developer_multiplier DOUBLE PRECISION NOT NULL, development_times__reversal_time DOUBLE PRECISION NOT NULL, development_times__reversal_multiplier DOUBLE PRECISION NOT NULL, development_times__color_developer_time DOUBLE PRECISION NOT NULL, development_times__color_developer_multiplier DOUBLE PRECISION NOT NULL, development_times__pre_bleach_time DOUBLE PRECISION NOT NULL, development_times__pre_bleach_multiplier DOUBLE PRECISION NOT NULL, development_times__bleach_time DOUBLE PRECISION NOT NULL, development_times__bleach_multiplier DOUBLE PRECISION NOT NULL, development_times__fixer_time DOUBLE PRECISION NOT NULL, development_times__fixer_multiplier DOUBLE PRECISION NOT NULL, development_times__clearing_time DOUBLE PRECISION NOT NULL, development_times__clearing_multiplier DOUBLE PRECISION NOT NULL, development_times__second_developer_time DOUBLE PRECISION NOT NULL, development_times__second_developer_multiplier DOUBLE PRECISION NOT NULL, PRIMARY KEY(id))'); | ||
$this->addSql('CREATE UNIQUE INDEX UNIQ_841ED2EC5E237E06 ON development_kits (name)'); | ||
$this->addSql('DROP TABLE development_kit'); | ||
$this->addSql('ALTER TABLE film_developments DROP CONSTRAINT FK_50B275403A8E60EF'); | ||
$this->addSql('ALTER TABLE film_developments ADD CONSTRAINT FK_50B275403A8E60EF FOREIGN KEY (kit_id) REFERENCES development_kits (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
$this->addSql('ALTER TABLE film_developments DROP CONSTRAINT FK_50B275403A8E60EF'); | ||
$this->addSql('CREATE TABLE development_kit (id VARCHAR(36) NOT NULL, name VARCHAR(128) NOT NULL, type VARCHAR(255) NOT NULL, untracked_developments INT DEFAULT 0 NOT NULL, development_times__first_developer_time DOUBLE PRECISION NOT NULL, development_times__first_developer_multiplier DOUBLE PRECISION NOT NULL, development_times__reversal DOUBLE PRECISION NOT NULL, development_times__reversal_multiplier DOUBLE PRECISION NOT NULL, development_times__color_developer_time DOUBLE PRECISION NOT NULL, development_times__color_developer_multiplier DOUBLE PRECISION NOT NULL, development_times__pre_bleach_time DOUBLE PRECISION NOT NULL, development_times__pre_bleach_multiplier DOUBLE PRECISION NOT NULL, development_times__bleach_time DOUBLE PRECISION NOT NULL, development_times__bleach_multiplier DOUBLE PRECISION NOT NULL, development_times__fixer_time DOUBLE PRECISION NOT NULL, development_times__fixer_multiplier DOUBLE PRECISION NOT NULL, development_times__clearing_time DOUBLE PRECISION NOT NULL, development_times__clearing_multiplier DOUBLE PRECISION NOT NULL, development_times__second_developer_time DOUBLE PRECISION NOT NULL, development_times__second_developer_multiplier DOUBLE PRECISION NOT NULL, PRIMARY KEY(id))'); | ||
$this->addSql('CREATE UNIQUE INDEX uniq_aff942465e237e06 ON development_kit (name)'); | ||
$this->addSql('DROP TABLE development_kits'); | ||
$this->addSql('ALTER TABLE film_developments DROP CONSTRAINT fk_50b275403a8e60ef'); | ||
$this->addSql('ALTER TABLE film_developments ADD CONSTRAINT fk_50b275403a8e60ef FOREIGN KEY (kit_id) REFERENCES development_kit (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); | ||
} | ||
} |
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
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,17 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Dto\Development; | ||
|
||
class DevelopmentKitOutputDto | ||
{ | ||
public function __construct( | ||
public string $id, | ||
public string $name, | ||
public string $type, | ||
public int $developmentsCount, | ||
public DevelopmentTimesOutputDto $times, | ||
) { | ||
} | ||
} |
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,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Dto\Development; | ||
|
||
class DevelopmentTimesOutputDto | ||
{ | ||
public ?float $firstDeveloperTime = null; | ||
public ?float $firstDeveloperMultiplier = null; | ||
public ?float $reversalTime = null; | ||
public ?float $reversalMultiplier = null; | ||
public ?float $colorDeveloperTime = null; | ||
public ?float $colorDeveloperMultiplier = null; | ||
public ?float $preBleachTime = null; | ||
public ?float $preBleachMultiplier = null; | ||
public ?float $bleachTime = null; | ||
public ?float $bleachMultiplier = null; | ||
public ?float $fixerTime = null; | ||
public ?float $fixerMultiplier = null; | ||
public ?float $clearingTime = null; | ||
public ?float $clearingMultiplier = null; | ||
public ?float $secondDeveloperTime = null; | ||
public ?float $secondDeveloperMultiplier = null; | ||
} |
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.