m240808_181725_TipoHerramienta.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. use yii\db\Migration;
  3. /**
  4. * Class m240808_181725_TipoHerramienta
  5. */
  6. class m240808_181725_TipoHerramienta extends Migration
  7. {
  8. /**
  9. * {@inheritdoc}
  10. */
  11. public function safeUp()
  12. {
  13. $this->createTable('TipoHerramienta', [
  14. "id" => $this->string(36),
  15. "clave" => $this->string(100)->notNull(),
  16. "tipo" => $this->string(100)->notNull(),
  17. "descripcion" => $this->string(100),
  18. "creado" => $this->timestamp()->append(" with time zone"),
  19. "modificado" => $this->timestamp()->append(" with time zone"),
  20. "eliminado" => $this->timestamp()->append(" with time zone"),
  21. ]);
  22. $this->addPrimaryKey('TipoHerramientaPK', 'TipoHerramienta', 'id');
  23. }
  24. /**
  25. * {@inheritdoc}
  26. */
  27. public function safeDown()
  28. {
  29. $this->dropTable("TipoHerramienta");
  30. }
  31. /*
  32. // Use up()/down() to run migration code without a transaction.
  33. public function up()
  34. {
  35. }
  36. public function down()
  37. {
  38. echo "m240808_181725_TipoHerramienta cannot be reverted.\n";
  39. return false;
  40. }
  41. */
  42. }