Skip to content

Commit

Permalink
Merge pull request #20 from elstc/feature/increase-model-fields-length
Browse files Browse the repository at this point in the history
Increase model fields length
  • Loading branch information
nojimage authored Mar 25, 2021
2 parents 97b08d7 + e8e8b5d commit e502db7
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions config/Migrations/20210325152201_IncreaseModelFieldsLength.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php
/** @noinspection PhpUnused */

/**
* Copyright 2019 ELASTIC Consultants Inc.
*/

use Migrations\AbstractMigration;

class IncreaseModelFieldsLength extends AbstractMigration
{

public function up()
{
$table = $this->table('activity_logs', ['id' => false, 'collation' => 'utf8_general_ci']);
$table
->changeColumn('scope_model', 'string', [
'default' => null,
'limit' => 128,
'null' => false,
])
->changeColumn('issuer_model', 'string', [
'default' => null,
'limit' => 128,
'null' => true,
])
->changeColumn('object_model', 'string', [
'default' => null,
'limit' => 128,
'null' => true,
]);
$table->update();
}

public function down()
{
$table = $this->table('activity_logs', ['id' => false, 'collation' => 'utf8_general_ci']);
$table
->changeColumn('scope_model', 'string', [
'default' => null,
'limit' => 64,
'null' => false,
])
->changeColumn('issuer_model', 'string', [
'default' => null,
'limit' => 64,
'null' => true,
])
->changeColumn('object_model', 'string', [
'default' => null,
'limit' => 64,
'null' => true,
]);
$table->update();
}
}

0 comments on commit e502db7

Please sign in to comment.