12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace Application\Migrations;
- use Doctrine\DBAL\Migrations\AbstractMigration;
- use Doctrine\DBAL\Schema\Schema;
- /**
- * Auto-generated Migration: Please modify to your needs!
- */
- class Version20171107185545 extends AbstractMigration
- {
- /**
- * @param Schema $schema
- */
- public function up(Schema $schema)
- {
- $this->addsql(
- "UPDATE onu AS o
- JOIN nap AS n ON o.nap_id = n.id
- SET o.link = JSON_EXTRACT(n.extra_data, '$.link'), o.slot = JSON_EXTRACT(n.extra_data, '$.slot')
- WHERE o.link=0 AND o.slot=0;"
- );
- }
- /**
- * @param Schema $schema
- */
- public function down(Schema $schema)
- {
- // this down() migration is auto-generated, please modify it to your needs
- }
- }
|