Merge remote-tracking branch 'origin/support/3.2' into develop

This commit is contained in:
Molkobain
2024-07-25 10:53:55 +02:00
3 changed files with 18 additions and 27 deletions

View File

@@ -16,6 +16,13 @@
<attribute id="contact_id"/>
</attributes>
</naming>
<reconciliation>
<attributes>
<attribute id="action_id"/>
<attribute id="contact_id"/>
<attribute id="trigger_id"/>
</attributes>
</reconciliation>
<uniqueness_rules>
<rule>
<attributes>
@@ -116,6 +123,11 @@
<style>
<icon>../../images/icons/icons8-notification.svg</icon>
</style>
<reconciliation>
<attributes>
<attribute id="name"/>
</attributes>
</reconciliation>
</properties>
<fields>
<field id="title" xsi:type="AttributeString">
@@ -386,6 +398,11 @@
<attribute id="title"/>
</attributes>
</naming>
<reconciliation>
<attributes>
<attribute id="title"/>
</attributes>
</reconciliation>
<order>
<columns>
<column id="date" ascending="false" />

File diff suppressed because one or more lines are too long

View File

@@ -240,30 +240,4 @@ SQL
$this->assertEquals('from table 1', $sFromTable1Data, "Data was not moved as expected");
$this->assertEquals('from table 2', $sFromTable2Data, "Data was not moved as expected");
}
/**
* Test that the table has been renamed
*
* @covers ModuleInstallerAPI::RenameTableInDB
*
* @return void
* @throws \CoreException
* @throws \MySQLException
*/
public function testRenameTableInDB()
{
$sOrigTable = MetaModel::DBGetTable('Person');
$aOrigTableInfo = CMDBSource::GetTableInfo($sOrigTable);
$this->assertNotEmpty($aOrigTableInfo, 'Origin table does not exist');
$sDstTable = static::$sWorkTable;
$this->assertFalse(CMDBSource::IsTable($sDstTable), 'Work table already exists');
ModuleInstallerAPI::RenameTableInDB($sOrigTable, $sDstTable);
$this->assertEquals($aOrigTableInfo["Fields"], CMDBSource::GetTableInfo($sDstTable)["Fields"], 'Table was not renamed');
// Revert
ModuleInstallerAPI::RenameTableInDB($sDstTable, $sOrigTable);
$this->assertEquals($aOrigTableInfo["Fields"], CMDBSource::GetTableInfo($sOrigTable)["Fields"]);
}
}