Преглед на файлове

Se agrego migracion para agregar columna tipo en tabla vehiculo

Jose Cienfuegos преди 9 месеца
родител
ревизия
96558aef75
променени са 1 файла, в които са добавени 26 реда и са изтрити 0 реда
  1. 26 0
      migrations/m240719_013111_columna_tipo_vehiculo.php

+ 26 - 0
migrations/m240719_013111_columna_tipo_vehiculo.php

@@ -0,0 +1,26 @@
+<?php
+
+use yii\db\Migration;
+
+/**
+ * Class m240719_013111_columna_tipo_vehiculo
+ */
+class m240719_013111_columna_tipo_vehiculo extends Migration
+{
+    /**
+     * {@inheritdoc}
+     */
+    public function safeUp()
+    {
+        $this->addColumn("Vehiculo", "tipo", $this->string(100));
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function safeDown()
+    {
+        $this->dropColumn("Vehiculo", "tipo");
+    }
+
+}