mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
port PHRAS-2468: don't drop log_colls (#2959)
This commit is contained in:
@@ -50,6 +50,21 @@ class patch_380alpha3a extends patchAbstract
|
|||||||
{
|
{
|
||||||
$conn = $databox->get_connection();
|
$conn = $databox->get_connection();
|
||||||
|
|
||||||
|
$sql = "CREATE TABLE IF NOT EXISTS `log_colls` (\n"
|
||||||
|
. " `id` int(11) unsigned NOT NULL AUTO_INCREMENT,\n"
|
||||||
|
. " `log_id` int(11) unsigned NOT NULL,\n"
|
||||||
|
. " `coll_id` int(11) unsigned NOT NULL,\n"
|
||||||
|
. " PRIMARY KEY (`id`),\n"
|
||||||
|
. " UNIQUE KEY `couple` (`log_id`,`coll_id`),\n"
|
||||||
|
. " KEY `log_id` (`log_id`),\n"
|
||||||
|
. " KEY `coll_id` (`coll_id`)\n"
|
||||||
|
. ") ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;";
|
||||||
|
|
||||||
|
$stmt = $conn->prepare($sql);
|
||||||
|
$stmt->execute();
|
||||||
|
$stmt->closeCursor();
|
||||||
|
unset($stmt);
|
||||||
|
|
||||||
$removeProc = "DROP PROCEDURE IF EXISTS explode_log_table";
|
$removeProc = "DROP PROCEDURE IF EXISTS explode_log_table";
|
||||||
|
|
||||||
$stmt = $conn->prepare($removeProc);
|
$stmt = $conn->prepare($removeProc);
|
||||||
|
@@ -60,8 +60,14 @@ class patch_410alpha13a implements patchInterface
|
|||||||
*/
|
*/
|
||||||
public function apply(base $databox, Application $app)
|
public function apply(base $databox, Application $app)
|
||||||
{
|
{
|
||||||
|
// @see : https://phraseanet.atlassian.net/browse/PHRAS-2468
|
||||||
|
// to be able to migrate from 3.5 to 4.0.8, we must not delete the table anymore
|
||||||
|
// so the cli "bin/setup patch:log_coll_id" can be executed.
|
||||||
|
|
||||||
|
/*
|
||||||
$sql = "DROP TABLE IF EXISTS `log_colls`";
|
$sql = "DROP TABLE IF EXISTS `log_colls`";
|
||||||
$databox->get_connection()->prepare($sql)->execute();
|
$databox->get_connection()->prepare($sql)->execute();
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* no need to do those ops, it's done by system:upgrade after fixing the xml scheme
|
* no need to do those ops, it's done by system:upgrade after fixing the xml scheme
|
||||||
|
Reference in New Issue
Block a user