1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- use yii\db\Migration;
- /**
- * Class m240808_181725_TipoHerramienta
- */
- class m240808_181725_TipoHerramienta extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
-
- $this->createTable('TipoHerramienta', [
- "id" => $this->string(36),
- "clave" => $this->string(100)->notNull(),
- "tipo" => $this->string(100)->notNull(),
- "descripcion" => $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('TipoHerramientaPK', 'TipoHerramienta', 'id');
-
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- $this->dropTable("TipoHerramienta");
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "m240808_181725_TipoHerramienta cannot be reverted.\n";
- return false;
- }
- */
- }
|