Last active
August 29, 2020 19:01
-
-
Save mildlygeeky/50d9d9b8e0a74fc5e343859c508a6e4b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?php | |
namespace craft\contentmigrations; | |
use Craft; | |
use craft\db\Migration; | |
/** | |
* m200829_184642_fix_colour_swatches migration. | |
*/ | |
class m200829_184642_fix_colour_swatches extends Migration | |
{ | |
/** | |
* @inheritdoc | |
*/ | |
public function safeUp() | |
{ | |
$this->update( | |
'{{%fields}}', | |
[ | |
'type' => 'percipioglobal\\colourswatches\\fields\\ColourSwatches' | |
], | |
'type = :riastype', | |
[ | |
':riastype' => 'rias\\colourswatches\\fields\\ColourSwatches' | |
] | |
); | |
} | |
/** | |
* @inheritdoc | |
*/ | |
public function safeDown() | |
{ | |
echo "m200829_184642_fix_colour_swatches cannot be reverted.\n"; | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment