This repository has been archived by the owner on Dec 3, 2019. It is now read-only.
-
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.
Migration: change password column length
- Loading branch information
mik-laj
committed
Jul 7, 2016
1 parent
0a54453
commit fdb9022
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
config/Migrations/20160707183301_ChangeSizeOfPasswordColumn.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,29 @@ | ||
<?php | ||
use Migrations\AbstractMigration; | ||
|
||
class ChangeSizeOfPasswordColumn extends AbstractMigration | ||
{ | ||
|
||
public function up() | ||
{ | ||
|
||
$this->table('users') | ||
->changeColumn('password', 'string', [ | ||
'length' => 255, | ||
]) | ||
->update(); | ||
} | ||
|
||
public function down() | ||
{ | ||
|
||
$this->table('users') | ||
->changeColumn('password', 'string', [ | ||
'default' => null, | ||
'length' => 40, | ||
'null' => false, | ||
]) | ||
->update(); | ||
} | ||
} | ||
|
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