Skip to content

Commit

Permalink
Create 20191127144159_UpdatePrimaryKeysToLogs.php
Browse files Browse the repository at this point in the history
Alterando o tamanho do campo primary_key na tabela logs
  • Loading branch information
jeffersonsimaogoncalves committed Nov 27, 2019
1 parent 3451756 commit ec23d0e
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions config/Migrations/20191127144159_UpdatePrimaryKeysToLogs.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

use Migrations\AbstractMigration;

class UpdatePrimaryKeysToLogs extends AbstractMigration
{
/**
* Change Method.
*
* More information on this method is available here:
* http://docs.phinx.org/en/latest/migrations.html#the-change-method
*
* @return void
*/
public function change()
{
$table = $this->table('logs');
$table->changeColumn('primary_key', 'string', [
'default' => null,
'limit' => 255,
'null' => false,
]);
$table->update();
}
}

0 comments on commit ec23d0e

Please sign in to comment.