Remove status table

This commit is contained in:
Benoît Burnichon
2015-12-23 14:12:23 +01:00
parent 699cfad0b6
commit af25e6bfd8
2 changed files with 0 additions and 87 deletions

View File

@@ -1163,25 +1163,6 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
['status' => bindec($status), 'record_id' => $this->record_id] ['status' => bindec($status), 'record_id' => $this->record_id]
); );
$status = strrev($status);
$length = strlen($status);
$sqlValues = [];
for ($i = 4; $i < $length; $i++) {
$sqlValues[] = join(',', array(
'null',
$connection->quote($this->getRecordId()),
$connection->quote($i),
$connection->quote($status[$i])
));
}
$sql = "REPLACE INTO status (id, record_id, name, value)"
. " VALUES (" . join('),(', $sqlValues) . ")";
$stmt = $connection->prepare($sql);
$stmt->execute();
$stmt->closeCursor();
$this->delete_data_from_cache(self::CACHE_STATUS); $this->delete_data_from_cache(self::CACHE_STATUS);
$this->dispatch(RecordEvents::STATUS_CHANGED, new StatusChangedEvent($this)); $this->dispatch(RecordEvents::STATUS_CHANGED, new StatusChangedEvent($this));

View File

@@ -2447,74 +2447,6 @@
</indexes> </indexes>
<engine>InnoDB</engine> <engine>InnoDB</engine>
</table> </table>
<table name="status">
<fields>
<field>
<name>id</name>
<type>int(10) unsigned</type>
<null></null>
<extra>auto_increment</extra>
<default></default>
<comment></comment>
</field>
<field>
<name>record_id</name>
<type>int(11) unsigned</type>
<null></null>
<extra></extra>
<default>0</default>
<comment></comment>
</field>
<field>
<name>name</name>
<type>int(2) unsigned</type>
<null></null>
<extra></extra>
<default></default>
<comment></comment>
</field>
<field>
<name>value</name>
<type>tinyint(1) unsigned</type>
<null></null>
<extra></extra>
<default></default>
<comment></comment>
</field>
</fields>
<indexes>
<index>
<name>PRIMARY</name>
<type>PRIMARY</type>
<fields>
<field>id</field>
</fields>
</index>
<index>
<name>value</name>
<type>INDEX</type>
<fields>
<field>value</field>
</fields>
</index>
<index>
<name>record_id</name>
<type>INDEX</type>
<fields>
<field>record_id</field>
</fields>
</index>
<index>
<name>unique</name>
<type>UNIQUE</type>
<fields>
<field>record_id</field>
<field>name</field>
</fields>
</index>
</indexes>
<engine>InnoDB</engine>
</table>
<table name="idx"> <table name="idx">
<fields> <fields>
<field> <field>