-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create 20191127144159_UpdatePrimaryKeysToLogs.php
Alterando o tamanho do campo primary_key na tabela logs
- Loading branch information
1 parent
3451756
commit ec23d0e
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
config/Migrations/20191127144159_UpdatePrimaryKeysToLogs.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} |