-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed column type from varchar to text for historical field values
- Loading branch information
Showing
4 changed files
with
38 additions
and
32 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
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
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
src/migrations/m181117_192854_increase_data_column_size.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 | ||
|
||
namespace venveo\bulkedit\migrations; | ||
|
||
use Craft; | ||
use craft\db\Migration; | ||
|
||
/** | ||
* m181117_192854_increase_data_column_size migration. | ||
*/ | ||
class m181117_192854_increase_data_column_size extends Migration | ||
{ | ||
/** | ||
* @inheritdoc | ||
*/ | ||
public function safeUp() | ||
{ | ||
// Place migration code here... | ||
$this->alterColumn('{{%bulkedit_history}}', 'originalValue', $this->text()); | ||
$this->alterColumn('{{%bulkedit_history}}', 'newValue', $this->text()); | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function safeDown() | ||
{ | ||
echo "m181117_192854_increase_data_column_size cannot be reverted.\n"; | ||
return false; | ||
} | ||
} |