123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- use yii\db\Migration;
- /**
- * Class m240806_212252_tabla_tipoauto
- */
- class m240806_212252_tabla_tipoauto extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- // Crear la tabla Marca
- $this->createTable('TipoAuto', [
- "id" => $this->string(36),
- "clave" => $this->string(100)->notNull(),
- "tipo" => $this->string(100)->notNull(),
- "descripcion" => $this->string(100)->notNull(),
- "creado" => $this->timestamp()->append(" with time zone"),
- "modificado" => $this->timestamp()->append(" with time zone"),
- "eliminado" => $this->timestamp()->append(" with time zone"),
- ]);
- $this->addPrimaryKey('TipoAutoPK', 'TipoAuto', 'id');
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- $this->dropTable("TipoAuto");
-
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "m240806_212252_tabla_tipoauto cannot be reverted.\n";
- return false;
- }
- */
- }
|