mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-13 04:53:26 +00:00
Remove status table
This commit is contained in:
@@ -1163,25 +1163,6 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
|
||||
['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->dispatch(RecordEvents::STATUS_CHANGED, new StatusChangedEvent($this));
|
||||
|
@@ -2447,74 +2447,6 @@
|
||||
</indexes>
|
||||
<engine>InnoDB</engine>
|
||||
</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">
|
||||
<fields>
|
||||
<field>
|
||||
|
Reference in New Issue
Block a user