mirror of
https://github.com/humhub/humhub.git
synced 2025-02-12 03:26:25 +01:00
Avoid double index creation
This commit is contained in:
parent
23a6abcb2c
commit
56d276a9fa
@ -12,7 +12,8 @@ class m200715_184207_commentIndex extends Migration
|
||||
*/
|
||||
public function safeUp()
|
||||
{
|
||||
$this->createIndex('idx_comment_target', 'comment', ['object_model', 'object_id'], false);
|
||||
// Was only used in beta version, avoid double index creation in stable version update
|
||||
//$this->createIndex('idx_comment_target', 'comment', ['object_model', 'object_id'], false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -12,7 +12,12 @@ class m200729_080349_commentIndex_fix_order extends Migration
|
||||
*/
|
||||
public function safeUp()
|
||||
{
|
||||
$this->dropIndex('idx_comment_target', 'comment');
|
||||
try {
|
||||
$this->dropIndex('idx_comment_target', 'comment');
|
||||
} catch (\Exception $ex) {
|
||||
// May not exist, see migration m200715_184207_commentIndex
|
||||
}
|
||||
|
||||
$this->createIndex('idx_comment_target', 'comment', ['object_id', 'object_model'], false);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user