| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | public function up(Schema $schema): void |
||
| 19 | { |
||
| 20 | |||
| 21 | $this->addSql('CREATE TABLE stu_mining_queue (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, ship_id INT NOT NULL, location_mining_id INT NOT NULL, PRIMARY KEY(id))'); |
||
| 22 | $this->addSql('CREATE INDEX IDX_BBFEF8C427D56C25 ON stu_mining_queue (location_mining_id)'); |
||
| 23 | $this->addSql('CREATE UNIQUE INDEX UNIQ_BBFEF8C4C256317D ON stu_mining_queue (ship_id)'); |
||
| 24 | $this->addSql('ALTER TABLE stu_mining_queue ADD CONSTRAINT FK_BBFEF8C427D56C25 FOREIGN KEY (location_mining_id) REFERENCES stu_location_mining (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); |
||
| 25 | $this->addSql('ALTER TABLE stu_mining_queue ADD CONSTRAINT FK_BBFEF8C4C256317D FOREIGN KEY (ship_id) REFERENCES stu_ships (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); |
||
| 26 | } |
||
| 35 | } |