ソースを参照

Migracion/arreglo de la tenencia inicial

gabriel 7 年 前
コミット
5f3547accb
1 ファイル変更33 行追加0 行削除
  1. 33 0
      app/DoctrineMigrations/Version20171019134932.php

+ 33 - 0
app/DoctrineMigrations/Version20171019134932.php

@@ -0,0 +1,33 @@
+<?php
+
+namespace Application\Migrations;
+
+use Doctrine\DBAL\Migrations\AbstractMigration;
+use Doctrine\DBAL\Schema\Schema;
+
+/**
+ * Auto-generated Migration: Please modify to your needs!
+ */
+class Version20171019134932 extends AbstractMigration
+{
+    /**
+     * @param Schema $schema
+     */
+    public function up(Schema $schema)
+    {
+        // this up() migration is auto-generated, please modify it to your needs
+        $base = 1;
+        $initial = 2;
+
+        $this->addsql("UPDATE onu SET tenancy_id = " . $initial . " WHERE isnull(tenancy_id) or tenancy_id = " . $base);
+    }
+
+    /**
+     * @param Schema $schema
+     */
+    public function down(Schema $schema)
+    {
+        // this down() migration is auto-generated, please modify it to your needs
+
+    }
+}