| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- use yii\db\Migration;
- /**
- * Class m211215_012217_inicio
- */
- class m211215_012217_inicio extends Migration {
- /**
- * {@inheritdoc}
- */
- public function safeUp() {
- $this->createTable("Descarga", [
- "id" => $this->primaryKey(),
- "hash" => $this->string(32),
- "estacion" => $this->string(20),
- "archivo" => $this->string(100),
- "ciudad" => $this->string(20),
- "pc" => $this->string(20),
- "fecha" => $this->timestamp(),
- "descargado" => $this->boolean()->defaultValue(false),
- "nombre" => $this->string(100),
- "ruta" => $this->string(100)
- ]);
- $this->createIndex("DescargaHashIndex", "Descarga", "hash");
- $this->createIndex("DescargaEstacionIndex", "Descarga", "estacion");
- $this->createIndex("DescargaCiudadIndex", "Descarga", "ciudad");
- $this->createIndex("DescargaFechaIndex", "Descarga", "fecha");
- $this->createIndex("DescargaPcIndex", "Descarga", "pc");
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown() {
- $this->dropTable("Descarga");
- }
- }
|