Skip to content

Instantly share code, notes, and snippets.

@mildlygeeky
Last active August 29, 2020 19:01
Show Gist options
  • Save mildlygeeky/50d9d9b8e0a74fc5e343859c508a6e4b to your computer and use it in GitHub Desktop.
Save mildlygeeky/50d9d9b8e0a74fc5e343859c508a6e4b to your computer and use it in GitHub Desktop.
<?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