public function down(Schema $schema)
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql');
$this->addSql('CREATE TABLE typo3_flow_resource_publishing_abstractpublishingconfiguration (persistence_object_identifier VARCHAR(40) NOT NULL, dtype VARCHAR(255) NOT NULL, PRIMARY KEY(persistence_object_identifier))');
$this->addSql('CREATE TABLE typo3_flow_resource_resourcepointer (hash VARCHAR(255) NOT NULL, PRIMARY KEY(hash))');
$this->addSql('ALTER TABLE typo3_flow_resource_resource RENAME sha1 TO resourcepointer');
$this->addSql('ALTER TABLE typo3_flow_resource_resource ALTER resourcepointer TYPE VARCHAR(255), ALTER resourcepointer DROP NOT NULL, ALTER resourcepointer SET DEFAULT NULL');
$this->addSql('ALTER TABLE typo3_flow_resource_resource ADD publishingconfiguration VARCHAR(40) DEFAULT NULL');
$this->addSql('ALTER TABLE typo3_flow_resource_resource ADD fileextension VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE typo3_flow_resource_resource DROP md5');
$this->addSql('ALTER TABLE typo3_flow_resource_resource DROP collectionname');
$this->addSql('ALTER TABLE typo3_flow_resource_resource DROP mediatype');
$this->addSql('ALTER TABLE typo3_flow_resource_resource DROP relativepublicationpath');
$this->addSql('ALTER TABLE typo3_flow_resource_resource DROP filesize');
$this->addSql('ALTER TABLE typo3_flow_resource_resource ADD CONSTRAINT fk_b4d45b32a4a851af FOREIGN KEY (publishingconfiguration) REFERENCES typo3_flow_resource_publishing_abstractpublishingconfiguration (persistence_object_identifier) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX idx_b4d45b323cb65d1 ON typo3_flow_resource_resource (resourcepointer)');
$this->addSql('CREATE INDEX idx_b4d45b32a4a851af ON typo3_flow_resource_resource (publishingconfiguration)');
}