migrations/Version20200810041451.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20200810041451 extends AbstractMigration
  10. {
  11.     public function getDescription() : string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema) : void
  16.     {
  17.         $mobilesHuerta = [ 56];
  18.         $mobilesSanJuan = [ 12];
  19.         // huerta: -59.084636 -34.481763
  20.         // larrea: -58.615094 -34.646493
  21.         // san juan: -58.386109 -34.622202
  22.         // alfonsina storni: -58.392511 -34.878747
  23.         // movil 1 (huerta -> larrea 259 Moron) 
  24.         $this->addSql('INSERT INTO vehicle_work_schedule(vehicle_id, `day`, `start`, `end`, start_location, end_location) ' .
  25.                         'VALUES(1, 2, \'08:00:00\', \'20:00:00\', ST_GeomFromText(\'POINT(-59.084636 -34.481763)\'), ST_GeomFromText(\'POINT(-58.615094 -34.646493)\'))');
  26.         $this->addSql('INSERT INTO vehicle_work_schedule(vehicle_id, `day`, `start`, `end`, start_location, end_location) ' .
  27.                         'VALUES(1, 3, \'08:00:00\', \'20:00:00\', ST_GeomFromText(\'POINT(-59.084636 -34.481763)\'), ST_GeomFromText(\'POINT(-58.615094 -34.646493)\'))');
  28.         $this->addSql('INSERT INTO vehicle_work_schedule(vehicle_id, `day`, `start`, `end`, start_location, end_location) ' .
  29.                         'VALUES(1, 4, \'08:00:00\', \'20:00:00\', ST_GeomFromText(\'POINT(-59.084636 -34.481763)\'), ST_GeomFromText(\'POINT(-58.615094 -34.646493)\'))');
  30.         $this->addSql('INSERT INTO vehicle_work_schedule(vehicle_id, `day`, `start`, `end`, start_location, end_location) ' .
  31.                         'VALUES(1, 5, \'08:00:00\', \'20:00:00\', ST_GeomFromText(\'POINT(-59.084636 -34.481763)\'), ST_GeomFromText(\'POINT(-58.615094 -34.646493)\'))');
  32.         $this->addSql('INSERT INTO vehicle_work_schedule(vehicle_id, `day`, `start`, `end`, start_location, end_location) ' .
  33.                         'VALUES(1, 6, \'08:00:00\', \'20:00:00\', ST_GeomFromText(\'POINT(-59.084636 -34.481763)\'), ST_GeomFromText(\'POINT(-58.615094 -34.646493)\'))');
  34.         
  35.         // movil 2 (san juan -> Alfonsina Storni 2166 Glew) 
  36.         $this->addSql('INSERT INTO vehicle_work_schedule(vehicle_id, `day`, `start`, `end`, start_location, end_location) ' .
  37.                         'VALUES(2, 2, \'08:00:00\', \'20:00:00\', ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'), ST_GeomFromText(\'POINT(-58.392511 -34.878747)\'))');
  38.         $this->addSql('INSERT INTO vehicle_work_schedule(vehicle_id, `day`, `start`, `end`, start_location, end_location) ' .
  39.                         'VALUES(2, 3, \'08:00:00\', \'20:00:00\', ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'), ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'))');
  40.         $this->addSql('INSERT INTO vehicle_work_schedule(vehicle_id, `day`, `start`, `end`, start_location, end_location) ' .
  41.                         'VALUES(2, 4, \'08:00:00\', \'20:00:00\', ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'), ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'))');
  42.         $this->addSql('INSERT INTO vehicle_work_schedule(vehicle_id, `day`, `start`, `end`, start_location, end_location) ' .
  43.                         'VALUES(2, 5, \'08:00:00\', \'20:00:00\', ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'), ST_GeomFromText(\'POINT(-58.392511 -34.878747)\'))');
  44.         $this->addSql('INSERT INTO vehicle_work_schedule(vehicle_id, `day`, `start`, `end`, start_location, end_location) ' .
  45.                         'VALUES(2, 6, \'08:00:00\', \'20:00:00\', ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'), ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'))');
  46.         // movil 3 (san juan -> san juan)
  47.         $this->addSql('INSERT INTO vehicle_work_schedule(vehicle_id, `day`, `start`, `end`, start_location, end_location) ' .
  48.                         'VALUES(3, 2, \'08:00:00\', \'20:00:00\', ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'), ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'))');
  49.         $this->addSql('INSERT INTO vehicle_work_schedule(vehicle_id, `day`, `start`, `end`, start_location, end_location) ' .
  50.                         'VALUES(3, 3, \'08:00:00\', \'20:00:00\', ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'), ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'))');
  51.         $this->addSql('INSERT INTO vehicle_work_schedule(vehicle_id, `day`, `start`, `end`, start_location, end_location) ' .
  52.                         'VALUES(3, 4, \'08:00:00\', \'20:00:00\', ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'), ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'))');
  53.         $this->addSql('INSERT INTO vehicle_work_schedule(vehicle_id, `day`, `start`, `end`, start_location, end_location) ' .
  54.                         'VALUES(3, 5, \'08:00:00\', \'20:00:00\', ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'), ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'))');
  55.         $this->addSql('INSERT INTO vehicle_work_schedule(vehicle_id, `day`, `start`, `end`, start_location, end_location) ' .
  56.                         'VALUES(3, 6, \'08:00:00\', \'20:00:00\', ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'), ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'))');
  57.         // movil 5 (san juan -> Primera junta 2340 Villa Libertad) excepto martes
  58.         $this->addSql('INSERT INTO vehicle_work_schedule(vehicle_id, `day`, `start`, `end`, start_location, end_location) ' .
  59.                         'VALUES(5, 1, \'08:00:00\', \'20:00:00\', ST_GeomFromText(\'POINT(-59.084636 -34.481763)\'), ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'))');
  60.         $this->addSql('INSERT INTO vehicle_work_schedule(vehicle_id, `day`, `start`, `end`, start_location, end_location) ' .
  61.                         'VALUES(5, 2, \'08:00:00\', \'20:00:00\', ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'), ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'))');
  62.         $this->addSql('INSERT INTO vehicle_work_schedule(vehicle_id, `day`, `start`, `end`, start_location, end_location) ' .
  63.                         'VALUES(5, 3, \'08:00:00\', \'20:00:00\', ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'), ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'))');
  64.         $this->addSql('INSERT INTO vehicle_work_schedule(vehicle_id, `day`, `start`, `end`, start_location, end_location) ' .
  65.                         'VALUES(5, 4, \'08:00:00\', \'20:00:00\', ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'), ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'))');
  66.         $this->addSql('INSERT INTO vehicle_work_schedule(vehicle_id, `day`, `start`, `end`, start_location, end_location) ' .
  67.                         'VALUES(5, 5, \'08:00:00\', \'20:00:00\', ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'), ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'))');
  68.         // movil 6 (huerta -> huerta)
  69.         $this->addSql('INSERT INTO vehicle_work_schedule(vehicle_id, `day`, `start`, `end`, start_location, end_location) ' .
  70.                         'VALUES(6, 3, \'08:00:00\', \'14:00:00\', ST_GeomFromText(\'POINT(-59.084636 -34.481763)\'), ST_GeomFromText(\'POINT(-59.084636 -34.481763)\'))');
  71.         
  72.         // movil 7 (san juan -> san juan)
  73.         $this->addSql('INSERT INTO vehicle_work_schedule(vehicle_id, `day`, `start`, `end`, start_location, end_location) ' .
  74.                         'VALUES(7, 1, \'08:00:00\', \'20:00:00\', ST_GeomFromText(\'POINT(-59.084636 -34.481763)\'), ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'))');
  75.         $this->addSql('INSERT INTO vehicle_work_schedule(vehicle_id, `day`, `start`, `end`, start_location, end_location) ' .
  76.                         'VALUES(7, 3, \'08:00:00\', \'20:00:00\', ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'), ST_GeomFromText(\'POINT(-58.386109 -34.622202)\'))');
  77.     }
  78.     public function down(Schema $schema) : void
  79.     {
  80.         // this down() migration is auto-generated, please modify it to your needs
  81.         $this->addSql('DELETE FROM vehicle_work_schedule');
  82.     }
  83. }