12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- use yii\db\Migration;
- /**
- * Class m240809_163926_Empleado
- */
- class m240809_163926_Empleado extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $this->createTable('Empleado', [
- "id" => $this->string(36),
- "nombre" => $this->string(100)->notNull(),
- "fechaAlta" => $this->timestamp()->append(" with time zone"),
- "estatus" => $this->boolean()->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('EmpleadoPK', 'Empleado', 'id');
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- $this->dropTable('Empleado');
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "m240809_163926_Empleado cannot be reverted.\n";
- return false;
- }
- */
- }
|