Skip to content

Commit

Permalink
Upgrade Client installs to Pro
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Apr 6, 2018
1 parent b07024d commit da19602
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
namespace Craft;

define('CRAFT_VERSION', '2.6.3014');
define('CRAFT_SCHEMA_VERSION', '2.6.13');
define('CRAFT_SCHEMA_VERSION', '2.6.14');
define('CRAFT_MIN_VERSION_REQUIRED', '2.6.2922');
27 changes: 27 additions & 0 deletions src/migrations/m180406_000000_pro_upgrade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
namespace Craft;

/**
* The class name is the UTC timestamp in the format of mYYMMDD_HHMMSS_migrationName
*/
class m180406_000000_pro_upgrade extends BaseMigration
{
/**
* Any migration code in here is wrapped inside of a transaction.
*
* @return bool
*/
public function safeUp()
{
$info = craft()->getInfo();
if ($info->edition == Craft::Client)
{
$info->edition = Craft::Pro;
craft()->saveInfo($info);
}

craft()->cache->delete('licensedEdition');

return true;
}
}

0 comments on commit da19602

Please # to comment.