-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
2c913bc
commit 5d13b6a
Showing
2 changed files
with
25 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,24 @@ | ||
<?php | ||
/** | ||
* ownCloud - quicknotes | ||
* | ||
* This file is licensed under the Affero General Public License version 3 or | ||
* later. See the COPYING file. | ||
* | ||
* @author Matias De lellis <[email protected]> | ||
* @copyright Matias De lellis 2016 | ||
*/ | ||
|
||
$installedVersion = \OCP\Config::getAppValue('quicknotes', 'installed_version'); | ||
|
||
if (version_compare($installedVersion, '0.0.8', '<')) { | ||
$sqls = array( | ||
"INSERT INTO `*PREFIX*quicknotes_colors` (color) VALUES ('#F7EB98');", // Other color the default no handle easy duplicate colors.. | ||
"UPDATE `*PREFIX*quicknotes_notes` SET color_id = (SELECT DISTINCT id FROM `*PREFIX*quicknotes_colors` WHERE color = '#F7EB98');" | ||
); | ||
foreach ($sqls as $sql) { | ||
$query = \OCP\DB::prepare($sql); | ||
$query->execute(); | ||
} | ||
} | ||
|