123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- use yii\db\Migration;
- /**
- * Class m240806_184222_tabla_marca
- */
- class m240806_184222_tabla_marca extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- // Crear la tabla Marca
- $this->createTable('Marca', [
- "id" => $this->string(36),
- "clave" => $this->string(100)->notNull(),
- "marca" => $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('MarcaPK', 'Marca', 'id');
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- $this->dropTable("Marca");
- }
-
- }
|