mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc6c894cb8 | ||
|
|
3fa9b68882 | ||
|
|
0514f889d3 |
@@ -16,6 +16,13 @@
|
|||||||
<attribute id="contact_id"/>
|
<attribute id="contact_id"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</naming>
|
</naming>
|
||||||
|
<reconciliation>
|
||||||
|
<attributes>
|
||||||
|
<attribute id="action_id"/>
|
||||||
|
<attribute id="contact_id"/>
|
||||||
|
<attribute id="trigger_id"/>
|
||||||
|
</attributes>
|
||||||
|
</reconciliation>
|
||||||
<uniqueness_rules>
|
<uniqueness_rules>
|
||||||
<rule>
|
<rule>
|
||||||
<attributes>
|
<attributes>
|
||||||
@@ -116,6 +123,11 @@
|
|||||||
<style>
|
<style>
|
||||||
<icon>../../images/icons/icons8-notification.svg</icon>
|
<icon>../../images/icons/icons8-notification.svg</icon>
|
||||||
</style>
|
</style>
|
||||||
|
<reconciliation>
|
||||||
|
<attributes>
|
||||||
|
<attribute id="name"/>
|
||||||
|
</attributes>
|
||||||
|
</reconciliation>
|
||||||
</properties>
|
</properties>
|
||||||
<fields>
|
<fields>
|
||||||
<field id="title" xsi:type="AttributeString">
|
<field id="title" xsi:type="AttributeString">
|
||||||
@@ -386,6 +398,11 @@
|
|||||||
<attribute id="title"/>
|
<attribute id="title"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</naming>
|
</naming>
|
||||||
|
<reconciliation>
|
||||||
|
<attributes>
|
||||||
|
<attribute id="title"/>
|
||||||
|
</attributes>
|
||||||
|
</reconciliation>
|
||||||
<order>
|
<order>
|
||||||
<columns>
|
<columns>
|
||||||
<column id="date" ascending="false" />
|
<column id="date" ascending="false" />
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -240,30 +240,4 @@ SQL
|
|||||||
$this->assertEquals('from table 1', $sFromTable1Data, "Data was not moved as expected");
|
$this->assertEquals('from table 1', $sFromTable1Data, "Data was not moved as expected");
|
||||||
$this->assertEquals('from table 2', $sFromTable2Data, "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"]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user