createTable("Condicionante", [ "id" => $this->string(36), "titulo" => $this->string(100), "descripcion" => $this->text(), "activa" => $this->boolean(), "amplitud" => $this->string(50), "idProducto" => $this->string(36), "subproductos" => $this->text(), "idCreador" => $this->string(36), "idModificador" => $this->string(36), "creado" => $this->timestamp(). " with time zone", "modificado" => $this->timestamp(). " with time zone", "eliminado" => $this->timestamp(). " with time zone", ]); $this->addPrimaryKey("CondicionantePK", "Condicionante", "id"); $this->addForeignKey("CondicionanteProductoFK", "Condicionante", "idProducto", "Producto", "id"); $this->addForeignKey("CondicionanteCreadorFK", "Condicionante", "idCreador", "Usuario", "id"); $this->addForeignKey("CondicionanteModificadorFK", "Condicionante", "idModificador", "Usuario", "id"); $this->createTable("CondicionanteFin", [ "idFin" => $this->string(36), "idCondicionante" => $this->string(36), "creado" => $this->dateTime(), "modificado" => $this->dateTime(), "eliminado" => $this->dateTime(), ]); $this->addPrimaryKey("CondicionanteFinPK", "CondicionanteFin", ["idFin", "idCondicionante"]); $this->createTable("CondicionanteTipo", [ "idTipo" => $this->string(36), "idCondicionante" => $this->string(36), "creado" => $this->timestamp(). " with time zone", "modificado" => $this->timestamp(). " with time zone", "eliminado" => $this->timestamp(). " with time zone", ]); $this->addPrimaryKey("CondicionanteTipoPK", "CondicionanteTipo", ["idTipo", "idCondicionante"]); $this->createTable("CondicionanteOrigen", [ "idOrigen" => $this->string(36), "idCondicionante" => $this->string(36), "creado" => $this->timestamp(). " with time zone", "modificado" => $this->timestamp(). " with time zone", "eliminado" => $this->timestamp(). " with time zone", ]); $this->addPrimaryKey("CondicionanteOrigenPK", "CondicionanteOrigen", ["idOrigen", "idCondicionante"]); $this->createTable("CondicionanteDestino", [ "idDestino" => $this->string(36), "idCondicionante" => $this->string(36), "creado" => $this->timestamp(). " with time zone", "modificado" => $this->timestamp(). " with time zone", "eliminado" => $this->timestamp(). " with time zone", ]); $this->addPrimaryKey("CondicionanteDestinoPK", "CondicionanteDestino", ["idDestino", "idCondicionante"]); $this->createTable("CondicionanteCondicionante", [ "id" => $this->string(36), "idCondicionante" => $this->string(36), "nombre" => $this->string(100), "creado" => $this->timestamp(). " with time zone", "modificado" => $this->timestamp(). " with time zone", "eliminado" => $this->timestamp(). " with time zone", ]); $this->addPrimaryKey("CondicionanteCondicionantePK", "CondicionanteCondicionante", "id"); } /** * {@inheritdoc} */ public function safeDown() { $this->dropTable("CondicionanteCondicionante"); $this->dropTable("CondicionanteDestino"); $this->dropTable("CondicionanteOrigen"); $this->dropTable("CondicionanteTipo"); $this->dropTable("CondicionanteFin"); $this->dropTable("Condicionante"); } }