|
@@ -0,0 +1,52 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+use yii\db\Migration;
|
|
|
+
|
|
|
+/**
|
|
|
+ * Class m240717_221515_tablas_taller_vehiculo
|
|
|
+ */
|
|
|
+class m240717_221515_tablas_taller_vehiculo extends Migration
|
|
|
+{
|
|
|
+ /**
|
|
|
+ * {@inheritdoc}
|
|
|
+ */
|
|
|
+ public function safeUp() {
|
|
|
+
|
|
|
+ $this->createTable('Taller', [
|
|
|
+ "id" => $this->string(36),
|
|
|
+ "nombre" => $this->string(100)->notNull(),
|
|
|
+ "direccion" => $this->string(100)->notNull(),
|
|
|
+ "mecanico" => $this->string(100)->notNull(),
|
|
|
+ "descripcion" => $this->text(),
|
|
|
+ "telefono" => $this->integer(10),
|
|
|
+ "creado" => $this->timestamp()->append(" with time zone"),
|
|
|
+ "modificado" => $this->timestamp()->append(" with time zone"),
|
|
|
+ "eliminado" => $this->timestamp()->append(" with time zone"),
|
|
|
+ ]);
|
|
|
+
|
|
|
+ $this->addPrimaryKey("TallerPK", "Taller", "id");
|
|
|
+
|
|
|
+ $this->createTable('Vehiculo', [
|
|
|
+ "id" => $this->string(36),
|
|
|
+ "nombre" => $this->string(100),
|
|
|
+ "ano" => $this->integer(4),
|
|
|
+ "color" => $this->string(100),
|
|
|
+ "placa" => $this->string(100),
|
|
|
+ "serie" => $this->string(100),
|
|
|
+ "creado" => $this->timestamp()->append(" with time zone"),
|
|
|
+ "modificado" => $this->timestamp()->append(" with time zone"),
|
|
|
+ "eliminado" => $this->timestamp()->append(" with time zone"),
|
|
|
+ ]);
|
|
|
+
|
|
|
+ $this->addPrimaryKey("VehiculoPK", "Vehiculo", "id");
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * {@inheritdoc}
|
|
|
+ */
|
|
|
+ public function safeDown() {
|
|
|
+ $this->dropTable('Vehiculo');
|
|
|
+ $this->dropTable('Taller');
|
|
|
+ }
|
|
|
+}
|