-
-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Increase the lotw password size in the database
Fixes #3244
- Loading branch information
Showing
2 changed files
with
32 additions
and
1 deletion.
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
31 changes: 31 additions & 0 deletions
31
application/migrations/192_increase_lotwpass_field_val.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,31 @@ | ||
<?php | ||
defined('BASEPATH') or exit('No direct script access allowed'); | ||
|
||
class Migration_increase_lotwpass_field_val extends CI_Migration | ||
{ | ||
public function up() | ||
{ | ||
// In the user table increase the length of the user_lotw_password field to 255 | ||
$this->dbforge->modify_column('users', array( | ||
'user_lotw_password' => array( | ||
'name' => 'user_lotw_password', | ||
'type' => 'VARCHAR', | ||
'constraint' => '255', | ||
'null' => TRUE | ||
) | ||
)); | ||
} | ||
|
||
public function down() | ||
{ | ||
// Reset it back to 64 | ||
$this->dbforge->modify_column('users', array( | ||
'user_lotw_password' => array( | ||
'name' => 'user_lotw_password', | ||
'type' => 'VARCHAR', | ||
'constraint' => '64', | ||
'null' => TRUE | ||
) | ||
)); | ||
} | ||
} |