mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
BranchStore: wipe branched tables, not real ones
This commit is contained in:
parent
0cb6e40681
commit
f2eb06ae39
@ -45,7 +45,7 @@ class BranchStore
|
|||||||
public function cloneBranchForSync(Branch $branch, $newName, $owner)
|
public function cloneBranchForSync(Branch $branch, $newName, $owner)
|
||||||
{
|
{
|
||||||
$this->runTransaction(function ($db) use ($branch, $newName, $owner) {
|
$this->runTransaction(function ($db) use ($branch, $newName, $owner) {
|
||||||
$tables = BranchSupport::OBJECT_TABLES;
|
$tables = BranchSupport::BRANCHED_TABLES;
|
||||||
$tables[] = self::TABLE_ACTIVITY;
|
$tables[] = self::TABLE_ACTIVITY;
|
||||||
$newBranch = $this->createBranchByName($newName, $owner);
|
$newBranch = $this->createBranchByName($newName, $owner);
|
||||||
$oldQuotedUuid = DbUtil::quoteBinaryCompat($branch->getUuid()->getBytes(), $db);
|
$oldQuotedUuid = DbUtil::quoteBinaryCompat($branch->getUuid()->getBytes(), $db);
|
||||||
@ -88,7 +88,7 @@ class BranchStore
|
|||||||
public function wipeBranch(Branch $branch, $after = null)
|
public function wipeBranch(Branch $branch, $after = null)
|
||||||
{
|
{
|
||||||
$this->runTransaction(function ($db) use ($branch, $after) {
|
$this->runTransaction(function ($db) use ($branch, $after) {
|
||||||
$tables = BranchSupport::OBJECT_TABLES;
|
$tables = BranchSupport::BRANCHED_TABLES;
|
||||||
$tables[] = self::TABLE_ACTIVITY;
|
$tables[] = self::TABLE_ACTIVITY;
|
||||||
$quotedUuid = DbUtil::quoteBinaryCompat($branch->getUuid()->getBytes(), $db);
|
$quotedUuid = DbUtil::quoteBinaryCompat($branch->getUuid()->getBytes(), $db);
|
||||||
$where = $db->quoteInto('branch_uuid = ?', $quotedUuid);
|
$where = $db->quoteInto('branch_uuid = ?', $quotedUuid);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user