-
Notifications
You must be signed in to change notification settings - Fork 638
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b07024d
commit da19602
Showing
2 changed files
with
28 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
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,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; | ||
} | ||
} |