-
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 20191111092900_UpdateFieldsToLogs.php
Alterando o tamanho das colunas table_name e database_name.
- Loading branch information
1 parent
d7651de
commit 3451756
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
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,30 @@ | ||
<?php | ||
|
||
use Migrations\AbstractMigration; | ||
|
||
class UpdateFieldsToLogs 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('table_name', 'string', [ | ||
'default' => null, | ||
'limit' => 255, | ||
'null' => false, | ||
]); | ||
$table->changeColumn('database_name', 'string', [ | ||
'default' => null, | ||
'limit' => 255, | ||
'null' => false, | ||
]); | ||
$table->update(); | ||
} | ||
} |