<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20150715154828 extends AbstractMigration
{
/**
* @param Schema $schema
*/
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
// SET FOREIGN_KEY_CHECKS=0
$this->addSql('SET FOREIGN_KEY_CHECKS=0');
// Manually added for Kevin M
$this->addSql('TRUNCATE user');
$this->addSql('CREATE TABLE coin_image (id INT AUTO_INCREMENT NOT NULL, coin_id INT DEFAULT NULL, image_id INT DEFAULT NULL, image_type INT DEFAULT NULL, comment LONGTEXT DEFAULT NULL, created_by INT DEFAULT NULL, modified_by INT DEFAULT NULL, creation_date DATETIME NOT NULL, modified_date DATETIME DEFAULT NULL, deleted TINYINT(1) DEFAULT NULL, INDEX IDX_B06A5C3884BBDA7 (coin_id), INDEX IDX_B06A5C383DA5256D (image_id), INDEX IDX_B06A5C387EE4BDB7 (image_type), INDEX IDX_B06A5C38DE12AB56 (created_by), INDEX IDX_B06A5C3825F94802 (modified_by), UNIQUE INDEX coin_image_idx (coin_id, image_type), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
$this->addSql('CREATE TABLE coin_image_type (id INT AUTO_INCREMENT NOT NULL, abbreviation VARCHAR(1) NOT NULL, type VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_60F48421BCF3411D (abbreviation), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
$this->addSql('ALTER TABLE coin_image ADD CONSTRAINT FK_B06A5C3884BBDA7 FOREIGN KEY (coin_id) REFERENCES coin (id)');
$this->addSql('ALTER TABLE coin_image ADD CONSTRAINT FK_B06A5C383DA5256D FOREIGN KEY (image_id) REFERENCES image (id)');
$this->addSql('ALTER TABLE coin_image ADD CONSTRAINT FK_B06A5C387EE4BDB7 FOREIGN KEY (image_type) REFERENCES coin_image_type (id)');
$this->addSql('ALTER TABLE coin_image ADD CONSTRAINT FK_B06A5C38DE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE coin_image ADD CONSTRAINT FK_B06A5C3825F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE object CHANGE hoard_id hoard_id INT DEFAULT NULL, CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE object ADD CONSTRAINT FK_A8ADABEC762C4B4D FOREIGN KEY (hoard_id) REFERENCES hoard (id)');
$this->addSql('ALTER TABLE object ADD CONSTRAINT FK_A8ADABECBC21F742 FOREIGN KEY (container_id) REFERENCES container (id)');
$this->addSql('ALTER TABLE object ADD CONSTRAINT FK_A8ADABECE308AC6F FOREIGN KEY (material_id) REFERENCES material (id)');
$this->addSql('ALTER TABLE object ADD CONSTRAINT FK_A8ADABECDE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE object ADD CONSTRAINT FK_A8ADABEC25F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_A8ADABEC762C4B4D ON object (hoard_id)');
$this->addSql('CREATE INDEX IDX_A8ADABECBC21F742 ON object (container_id)');
$this->addSql('CREATE INDEX IDX_A8ADABECE308AC6F ON object (material_id)');
$this->addSql('CREATE INDEX IDX_A8ADABECDE12AB56 ON object (created_by)');
$this->addSql('CREATE INDEX IDX_A8ADABEC25F94802 ON object (modified_by)');
$this->addSql('ALTER TABLE person CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE person ADD CONSTRAINT FK_34DCD176B7EB593A FOREIGN KEY (period1_id) REFERENCES period (id)');
$this->addSql('ALTER TABLE person ADD CONSTRAINT FK_34DCD176A55EF6D4 FOREIGN KEY (period2_id) REFERENCES period (id)');
$this->addSql('ALTER TABLE person ADD CONSTRAINT FK_34DCD176DE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE person ADD CONSTRAINT FK_34DCD17625F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_34DCD176B7EB593A ON person (period1_id)');
$this->addSql('CREATE INDEX IDX_34DCD176A55EF6D4 ON person (period2_id)');
$this->addSql('CREATE INDEX IDX_34DCD176DE12AB56 ON person (created_by)');
$this->addSql('CREATE INDEX IDX_34DCD17625F94802 ON person (modified_by)');
$this->addSql('ALTER TABLE user_hoard CHANGE can_edit can_edit TINYINT(1) DEFAULT NULL, CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE user_hoard ADD CONSTRAINT FK_F024C8BE762C4B4D FOREIGN KEY (hoard_id) REFERENCES hoard (id)');
$this->addSql('ALTER TABLE user_hoard ADD CONSTRAINT FK_F024C8BEA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE user_hoard ADD CONSTRAINT FK_F024C8BEDE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE user_hoard ADD CONSTRAINT FK_F024C8BE25F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_F024C8BE762C4B4D ON user_hoard (hoard_id)');
$this->addSql('CREATE INDEX IDX_F024C8BEA76ED395 ON user_hoard (user_id)');
$this->addSql('CREATE INDEX IDX_F024C8BEDE12AB56 ON user_hoard (created_by)');
$this->addSql('CREATE INDEX IDX_F024C8BE25F94802 ON user_hoard (modified_by)');
$this->addSql('ALTER TABLE user_country CHANGE can_edit can_edit TINYINT(1) DEFAULT NULL, CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE user_country ADD CONSTRAINT FK_B7ED76CF92F3E70 FOREIGN KEY (country_id) REFERENCES country (id)');
$this->addSql('ALTER TABLE user_country ADD CONSTRAINT FK_B7ED76CA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE user_country ADD CONSTRAINT FK_B7ED76CDE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE user_country ADD CONSTRAINT FK_B7ED76C25F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_B7ED76CF92F3E70 ON user_country (country_id)');
$this->addSql('CREATE INDEX IDX_B7ED76CA76ED395 ON user_country (user_id)');
$this->addSql('CREATE INDEX IDX_B7ED76CDE12AB56 ON user_country (created_by)');
$this->addSql('CREATE INDEX IDX_B7ED76C25F94802 ON user_country (modified_by)');
$this->addSql('ALTER TABLE hoard_image CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE hoard_image ADD CONSTRAINT FK_852FBBF0762C4B4D FOREIGN KEY (hoard_id) REFERENCES hoard (id)');
$this->addSql('ALTER TABLE hoard_image ADD CONSTRAINT FK_852FBBF03DA5256D FOREIGN KEY (image_id) REFERENCES image (id)');
$this->addSql('ALTER TABLE hoard_image ADD CONSTRAINT FK_852FBBF0DE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE hoard_image ADD CONSTRAINT FK_852FBBF025F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_852FBBF0762C4B4D ON hoard_image (hoard_id)');
$this->addSql('CREATE INDEX IDX_852FBBF03DA5256D ON hoard_image (image_id)');
$this->addSql('CREATE INDEX IDX_852FBBF0DE12AB56 ON hoard_image (created_by)');
$this->addSql('CREATE INDEX IDX_852FBBF025F94802 ON hoard_image (modified_by)');
$this->addSql('ALTER TABLE object_reference CHANGE this_object this_object TINYINT(1) DEFAULT NULL, CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE object_reference ADD CONSTRAINT FK_6D980777232D562B FOREIGN KEY (object_id) REFERENCES object (id)');
$this->addSql('ALTER TABLE object_reference ADD CONSTRAINT FK_6D98077738B217A7 FOREIGN KEY (reference_id) REFERENCES reference (id)');
$this->addSql('ALTER TABLE object_reference ADD CONSTRAINT FK_6D980777DE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE object_reference ADD CONSTRAINT FK_6D98077725F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_6D980777232D562B ON object_reference (object_id)');
$this->addSql('CREATE INDEX IDX_6D98077738B217A7 ON object_reference (reference_id)');
$this->addSql('CREATE INDEX IDX_6D980777DE12AB56 ON object_reference (created_by)');
$this->addSql('CREATE INDEX IDX_6D98077725F94802 ON object_reference (modified_by)');
$this->addSql('ALTER TABLE discovery_method CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE discovery_method ADD CONSTRAINT FK_3C633F5FDE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE discovery_method ADD CONSTRAINT FK_3C633F5F25F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_3C633F5FDE12AB56 ON discovery_method (created_by)');
$this->addSql('CREATE INDEX IDX_3C633F5F25F94802 ON discovery_method (modified_by)');
$this->addSql('ALTER TABLE reign CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE reign ADD CONSTRAINT FK_8E780213B7EB593A FOREIGN KEY (period1_id) REFERENCES period (id)');
$this->addSql('ALTER TABLE reign ADD CONSTRAINT FK_8E780213A55EF6D4 FOREIGN KEY (period2_id) REFERENCES period (id)');
$this->addSql('ALTER TABLE reign ADD CONSTRAINT FK_8E780213DE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE reign ADD CONSTRAINT FK_8E78021325F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_8E780213B7EB593A ON reign (period1_id)');
$this->addSql('CREATE INDEX IDX_8E780213A55EF6D4 ON reign (period2_id)');
$this->addSql('CREATE INDEX IDX_8E780213DE12AB56 ON reign (created_by)');
$this->addSql('CREATE INDEX IDX_8E78021325F94802 ON reign (modified_by)');
$this->addSql('ALTER TABLE hoard CHANGE hoard_type_id hoard_type_id INT DEFAULT NULL, CHANGE to_enter_at_coin_level to_enter_at_coin_level TINYINT(1) DEFAULT NULL, CHANGE hide_what_id hide_what_id INT DEFAULT NULL, CHANGE hide_from_id hide_from_id INT DEFAULT NULL, CHANGE validated_by_user validated_by_user TINYINT(1) DEFAULT NULL, CHANGE validated_by_admin validated_by_admin TINYINT(1) DEFAULT NULL, CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE hoard ADD CONSTRAINT FK_12E633E6B70DC2BA FOREIGN KEY (hoard_type_id) REFERENCES hoard_type (id)');
$this->addSql('ALTER TABLE hoard ADD CONSTRAINT FK_12E633E6F92F3E70 FOREIGN KEY (country_id) REFERENCES country (id)');
$this->addSql('ALTER TABLE hoard ADD CONSTRAINT FK_12E633E6DEEAC6A5 FOREIGN KEY (find_spot_location_detail_id) REFERENCES find_spot_location_detail (id)');
$this->addSql('ALTER TABLE hoard ADD CONSTRAINT FK_12E633E634AABBD4 FOREIGN KEY (closing_reign1_id) REFERENCES reign (id)');
$this->addSql('ALTER TABLE hoard ADD CONSTRAINT FK_12E633E6261F143A FOREIGN KEY (closing_reign2_id) REFERENCES reign (id)');
$this->addSql('ALTER TABLE hoard ADD CONSTRAINT FK_12E633E68DC4B65F FOREIGN KEY (discovery_method_id) REFERENCES discovery_method (id)');
$this->addSql('ALTER TABLE hoard ADD CONSTRAINT FK_12E633E6C1C0C FOREIGN KEY (discovery_land_use_id) REFERENCES discovery_land_use (id)');
$this->addSql('ALTER TABLE hoard ADD CONSTRAINT FK_12E633E66DD859E5 FOREIGN KEY (archaeology_recovery_method_id) REFERENCES archaeology_recovery_method (id)');
$this->addSql('ALTER TABLE hoard ADD CONSTRAINT FK_12E633E61DD5DD5D FOREIGN KEY (archaeology_site_context_id) REFERENCES archaeology_site_context (id)');
$this->addSql('ALTER TABLE hoard ADD CONSTRAINT FK_12E633E6810A938 FOREIGN KEY (archaeology_site_context_detail_id) REFERENCES archaeology_site_context_detail (id)');
$this->addSql('ALTER TABLE hoard ADD CONSTRAINT FK_12E633E635C578C8 FOREIGN KEY (archaeology_period_id) REFERENCES archaeology_period (id)');
$this->addSql('ALTER TABLE hoard ADD CONSTRAINT FK_12E633E674F571E5 FOREIGN KEY (archaeology_context_nature_id) REFERENCES archaeology_context_nature (id)');
$this->addSql('ALTER TABLE hoard ADD CONSTRAINT FK_12E633E698581200 FOREIGN KEY (archaeology_end_period_id) REFERENCES archaeology_period (id)');
$this->addSql('ALTER TABLE hoard ADD CONSTRAINT FK_12E633E6AAD3DF75 FOREIGN KEY (find_spot_rating_id) REFERENCES rating (id)');
$this->addSql('ALTER TABLE hoard ADD CONSTRAINT FK_12E633E6D37CEDD0 FOREIGN KEY (archaeology_rating_id) REFERENCES rating (id)');
$this->addSql('ALTER TABLE hoard ADD CONSTRAINT FK_12E633E6DDF9AE8B FOREIGN KEY (contextual_rating_id) REFERENCES rating (id)');
$this->addSql('ALTER TABLE hoard ADD CONSTRAINT FK_12E633E6A32EFC6 FOREIGN KEY (rating_id) REFERENCES rating (id)');
$this->addSql('ALTER TABLE hoard ADD CONSTRAINT FK_12E633E6288BE329 FOREIGN KEY (hide_what_id) REFERENCES hide_what (id)');
$this->addSql('ALTER TABLE hoard ADD CONSTRAINT FK_12E633E6D94EF3DA FOREIGN KEY (hide_from_id) REFERENCES hide_from (id)');
$this->addSql('ALTER TABLE hoard ADD CONSTRAINT FK_12E633E6DE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE hoard ADD CONSTRAINT FK_12E633E625F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE rating CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE rating ADD CONSTRAINT FK_D8892622DE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE rating ADD CONSTRAINT FK_D889262225F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_D8892622DE12AB56 ON rating (created_by)');
$this->addSql('CREATE INDEX IDX_D889262225F94802 ON rating (modified_by)');
$this->addSql('ALTER TABLE reference CHANGE fully_entered fully_entered TINYINT(1) DEFAULT NULL, CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE reference ADD CONSTRAINT FK_AF3C6779CDC55AAF FOREIGN KEY (reference_type_id) REFERENCES reference_type (id)');
$this->addSql('ALTER TABLE reference ADD CONSTRAINT FK_AF3C6779DE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE reference ADD CONSTRAINT FK_AF3C677925F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_AF3C6779CDC55AAF ON reference (reference_type_id)');
$this->addSql('CREATE INDEX IDX_AF3C6779DE12AB56 ON reference (created_by)');
$this->addSql('CREATE INDEX IDX_AF3C677925F94802 ON reference (modified_by)');
$this->addSql('ALTER TABLE archaeology_site_context CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE archaeology_site_context ADD CONSTRAINT FK_A200B6BBDE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE archaeology_site_context ADD CONSTRAINT FK_A200B6BB25F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_A200B6BBDE12AB56 ON archaeology_site_context (created_by)');
$this->addSql('CREATE INDEX IDX_A200B6BB25F94802 ON archaeology_site_context (modified_by)');
$this->addSql('ALTER TABLE archaeology_period CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE archaeology_period ADD CONSTRAINT FK_4A24B0D5DE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE archaeology_period ADD CONSTRAINT FK_4A24B0D525F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_4A24B0D5DE12AB56 ON archaeology_period (created_by)');
$this->addSql('CREATE INDEX IDX_4A24B0D525F94802 ON archaeology_period (modified_by)');
$this->addSql('ALTER TABLE material CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE material ADD CONSTRAINT FK_7CBE7595DE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE material ADD CONSTRAINT FK_7CBE759525F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_7CBE7595DE12AB56 ON material (created_by)');
$this->addSql('CREATE INDEX IDX_7CBE759525F94802 ON material (modified_by)');
$this->addSql('ALTER TABLE hide_from CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE hide_from ADD CONSTRAINT FK_CBCB5CEBDE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE hide_from ADD CONSTRAINT FK_CBCB5CEB25F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_CBCB5CEBDE12AB56 ON hide_from (created_by)');
$this->addSql('CREATE INDEX IDX_CBCB5CEB25F94802 ON hide_from (modified_by)');
$this->addSql('ALTER TABLE hoard_reference CHANGE hoard_id hoard_id INT DEFAULT NULL, CHANGE reference_id reference_id INT DEFAULT NULL, CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE hoard_reference ADD CONSTRAINT FK_5F6B4953762C4B4D FOREIGN KEY (hoard_id) REFERENCES hoard (id)');
$this->addSql('ALTER TABLE hoard_reference ADD CONSTRAINT FK_5F6B495338B217A7 FOREIGN KEY (reference_id) REFERENCES reference (id)');
$this->addSql('ALTER TABLE hoard_reference ADD CONSTRAINT FK_5F6B4953DE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE hoard_reference ADD CONSTRAINT FK_5F6B495325F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_5F6B4953762C4B4D ON hoard_reference (hoard_id)');
$this->addSql('CREATE INDEX IDX_5F6B495338B217A7 ON hoard_reference (reference_id)');
$this->addSql('CREATE INDEX IDX_5F6B4953DE12AB56 ON hoard_reference (created_by)');
$this->addSql('CREATE INDEX IDX_5F6B495325F94802 ON hoard_reference (modified_by)');
$this->addSql('ALTER TABLE container CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE container ADD CONSTRAINT FK_C7A2EC1B1385F01 FOREIGN KEY (container_sherd_id) REFERENCES container_sherd (id)');
$this->addSql('ALTER TABLE container ADD CONSTRAINT FK_C7A2EC1BC18E1F30 FOREIGN KEY (container_form_id) REFERENCES container_form (id)');
$this->addSql('ALTER TABLE container ADD CONSTRAINT FK_C7A2EC1B762C4B4D FOREIGN KEY (hoard_id) REFERENCES hoard (id)');
$this->addSql('ALTER TABLE container ADD CONSTRAINT FK_C7A2EC1BE308AC6F FOREIGN KEY (material_id) REFERENCES material (id)');
$this->addSql('ALTER TABLE container ADD CONSTRAINT FK_C7A2EC1BDE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE container ADD CONSTRAINT FK_C7A2EC1B25F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_C7A2EC1B1385F01 ON container (container_sherd_id)');
$this->addSql('CREATE INDEX IDX_C7A2EC1BC18E1F30 ON container (container_form_id)');
$this->addSql('CREATE INDEX IDX_C7A2EC1B762C4B4D ON container (hoard_id)');
$this->addSql('CREATE INDEX IDX_C7A2EC1BE308AC6F ON container (material_id)');
$this->addSql('CREATE INDEX IDX_C7A2EC1BDE12AB56 ON container (created_by)');
$this->addSql('CREATE INDEX IDX_C7A2EC1B25F94802 ON container (modified_by)');
$this->addSql('ALTER TABLE user ADD username VARCHAR(255) NOT NULL, ADD username_canonical VARCHAR(255) NOT NULL, ADD email VARCHAR(255) NOT NULL, ADD email_canonical VARCHAR(255) NOT NULL, ADD enabled TINYINT(1) NOT NULL, ADD salt VARCHAR(255) NOT NULL, ADD last_login DATETIME DEFAULT NULL, ADD locked TINYINT(1) NOT NULL, ADD expired TINYINT(1) NOT NULL, ADD expires_at DATETIME DEFAULT NULL, ADD password_requested_at DATETIME DEFAULT NULL, ADD roles LONGTEXT NOT NULL COMMENT \'(DC2Type:array)\', ADD credentials_expired TINYINT(1) NOT NULL, ADD credentials_expire_at DATETIME DEFAULT NULL, CHANGE password password VARCHAR(255) NOT NULL, CHANGE administrator administrator TINYINT(1) DEFAULT NULL, CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL, CHANGE login confirmation_token VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE user ADD CONSTRAINT FK_8D93D649DE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE user ADD CONSTRAINT FK_8D93D64925F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D64992FC23A8 ON user (username_canonical)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D649A0D96FBF ON user (email_canonical)');
$this->addSql('CREATE INDEX IDX_8D93D649DE12AB56 ON user (created_by)');
$this->addSql('CREATE INDEX IDX_8D93D64925F94802 ON user (modified_by)');
$this->addSql('ALTER TABLE mint CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE mint ADD CONSTRAINT FK_318F361EC8B7ADE FOREIGN KEY (period_id) REFERENCES period (id)');
$this->addSql('ALTER TABLE mint ADD CONSTRAINT FK_318F361DE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE mint ADD CONSTRAINT FK_318F36125F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_318F361EC8B7ADE ON mint (period_id)');
$this->addSql('CREATE INDEX IDX_318F361DE12AB56 ON mint (created_by)');
$this->addSql('CREATE INDEX IDX_318F36125F94802 ON mint (modified_by)');
$this->addSql('ALTER TABLE coin CHANGE quantity quantity INT DEFAULT NULL, CHANGE imitation imitation TINYINT(1) DEFAULT NULL, CHANGE latest_coin latest_coin TINYINT(1) DEFAULT NULL, CHANGE intruder intruder TINYINT(1) DEFAULT NULL, CHANGE to_check to_check TINYINT(1) DEFAULT NULL, CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE coin ADD CONSTRAINT FK_5569975D762C4B4D FOREIGN KEY (hoard_id) REFERENCES hoard (id)');
$this->addSql('ALTER TABLE coin ADD CONSTRAINT FK_5569975D887793B6 FOREIGN KEY (condition_id) REFERENCES coin_condition (id)');
$this->addSql('ALTER TABLE coin ADD CONSTRAINT FK_5569975DBC21F742 FOREIGN KEY (container_id) REFERENCES container (id)');
$this->addSql('ALTER TABLE coin ADD CONSTRAINT FK_5569975DEA6EFDCD FOREIGN KEY (layer_id) REFERENCES layer (id)');
$this->addSql('ALTER TABLE coin ADD CONSTRAINT FK_5569975DEC8B7ADE FOREIGN KEY (period_id) REFERENCES period (id)');
$this->addSql('ALTER TABLE coin ADD CONSTRAINT FK_5569975DDE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE coin ADD CONSTRAINT FK_5569975D25F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_5569975D762C4B4D ON coin (hoard_id)');
$this->addSql('CREATE INDEX IDX_5569975D887793B6 ON coin (condition_id)');
$this->addSql('CREATE INDEX IDX_5569975DBC21F742 ON coin (container_id)');
$this->addSql('CREATE INDEX IDX_5569975DEA6EFDCD ON coin (layer_id)');
$this->addSql('CREATE INDEX IDX_5569975DEC8B7ADE ON coin (period_id)');
$this->addSql('CREATE INDEX IDX_5569975DDE12AB56 ON coin (created_by)');
$this->addSql('CREATE INDEX IDX_5569975D25F94802 ON coin (modified_by)');
$this->addSql('ALTER TABLE container_form CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE container_form ADD CONSTRAINT FK_DA731DC0DE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE container_form ADD CONSTRAINT FK_DA731DC025F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_DA731DC0DE12AB56 ON container_form (created_by)');
$this->addSql('CREATE INDEX IDX_DA731DC025F94802 ON container_form (modified_by)');
$this->addSql('ALTER TABLE container_sherd CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE container_sherd ADD CONSTRAINT FK_E2876041DE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE container_sherd ADD CONSTRAINT FK_E287604125F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_E2876041DE12AB56 ON container_sherd (created_by)');
$this->addSql('CREATE INDEX IDX_E287604125F94802 ON container_sherd (modified_by)');
$this->addSql('ALTER TABLE hoard_type CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE hoard_type ADD CONSTRAINT FK_416A9EC3DE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE hoard_type ADD CONSTRAINT FK_416A9EC325F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_416A9EC3DE12AB56 ON hoard_type (created_by)');
$this->addSql('CREATE INDEX IDX_416A9EC325F94802 ON hoard_type (modified_by)');
$this->addSql('ALTER TABLE layer CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE layer ADD CONSTRAINT FK_E4DB211ABC21F742 FOREIGN KEY (container_id) REFERENCES container (id)');
$this->addSql('ALTER TABLE layer ADD CONSTRAINT FK_E4DB211ADE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE layer ADD CONSTRAINT FK_E4DB211A25F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_E4DB211ABC21F742 ON layer (container_id)');
$this->addSql('CREATE INDEX IDX_E4DB211ADE12AB56 ON layer (created_by)');
$this->addSql('CREATE INDEX IDX_E4DB211A25F94802 ON layer (modified_by)');
$this->addSql('ALTER TABLE archaeology_context_nature CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE archaeology_context_nature ADD CONSTRAINT FK_6963BDC5DE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE archaeology_context_nature ADD CONSTRAINT FK_6963BDC525F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_6963BDC5DE12AB56 ON archaeology_context_nature (created_by)');
$this->addSql('CREATE INDEX IDX_6963BDC525F94802 ON archaeology_context_nature (modified_by)');
$this->addSql('ALTER TABLE denomination CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE denomination ADD CONSTRAINT FK_15AEA10CE308AC6F FOREIGN KEY (material_id) REFERENCES material (id)');
$this->addSql('ALTER TABLE denomination ADD CONSTRAINT FK_15AEA10CDE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE denomination ADD CONSTRAINT FK_15AEA10C25F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_15AEA10CE308AC6F ON denomination (material_id)');
$this->addSql('CREATE INDEX IDX_15AEA10CDE12AB56 ON denomination (created_by)');
$this->addSql('CREATE INDEX IDX_15AEA10C25F94802 ON denomination (modified_by)');
$this->addSql('ALTER TABLE archaeology_recovery_method CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE archaeology_recovery_method ADD CONSTRAINT FK_B8416BD1DE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE archaeology_recovery_method ADD CONSTRAINT FK_B8416BD125F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_B8416BD1DE12AB56 ON archaeology_recovery_method (created_by)');
$this->addSql('CREATE INDEX IDX_B8416BD125F94802 ON archaeology_recovery_method (modified_by)');
$this->addSql('ALTER TABLE find_spot_location_detail CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE find_spot_location_detail ADD CONSTRAINT FK_EFB055F1DE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE find_spot_location_detail ADD CONSTRAINT FK_EFB055F125F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_EFB055F1DE12AB56 ON find_spot_location_detail (created_by)');
$this->addSql('CREATE INDEX IDX_EFB055F125F94802 ON find_spot_location_detail (modified_by)');
$this->addSql('ALTER TABLE discovery_land_use CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE discovery_land_use ADD CONSTRAINT FK_41C1244FDE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE discovery_land_use ADD CONSTRAINT FK_41C1244F25F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_41C1244FDE12AB56 ON discovery_land_use (created_by)');
$this->addSql('CREATE INDEX IDX_41C1244F25F94802 ON discovery_land_use (modified_by)');
$this->addSql('ALTER TABLE archaeology_site_context_detail CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE archaeology_site_context_detail ADD CONSTRAINT FK_DEB6A2ACDE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE archaeology_site_context_detail ADD CONSTRAINT FK_DEB6A2AC25F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_DEB6A2ACDE12AB56 ON archaeology_site_context_detail (created_by)');
$this->addSql('CREATE INDEX IDX_DEB6A2AC25F94802 ON archaeology_site_context_detail (modified_by)');
$this->addSql('ALTER TABLE image CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE image ADD CONSTRAINT FK_C53D045FDE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE image ADD CONSTRAINT FK_C53D045F25F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_C53D045FDE12AB56 ON image (created_by)');
$this->addSql('CREATE INDEX IDX_C53D045F25F94802 ON image (modified_by)');
$this->addSql('ALTER TABLE reference_type CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE reference_type ADD CONSTRAINT FK_8726D6E4DE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE reference_type ADD CONSTRAINT FK_8726D6E425F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_8726D6E4DE12AB56 ON reference_type (created_by)');
$this->addSql('CREATE INDEX IDX_8726D6E425F94802 ON reference_type (modified_by)');
$this->addSql('ALTER TABLE coin_reference CHANGE this_specimen this_specimen TINYINT(1) DEFAULT NULL, CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE coin_reference ADD CONSTRAINT FK_B64E413184BBDA7 FOREIGN KEY (coin_id) REFERENCES coin (id)');
$this->addSql('ALTER TABLE coin_reference ADD CONSTRAINT FK_B64E413138B217A7 FOREIGN KEY (reference_id) REFERENCES reference (id)');
$this->addSql('ALTER TABLE coin_reference ADD CONSTRAINT FK_B64E4131DE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE coin_reference ADD CONSTRAINT FK_B64E413125F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_B64E413184BBDA7 ON coin_reference (coin_id)');
$this->addSql('CREATE INDEX IDX_B64E413138B217A7 ON coin_reference (reference_id)');
$this->addSql('CREATE INDEX IDX_B64E4131DE12AB56 ON coin_reference (created_by)');
$this->addSql('CREATE INDEX IDX_B64E413125F94802 ON coin_reference (modified_by)');
$this->addSql('ALTER TABLE report CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE report ADD CONSTRAINT FK_C42F7784762C4B4D FOREIGN KEY (hoard_id) REFERENCES hoard (id)');
$this->addSql('ALTER TABLE report ADD CONSTRAINT FK_C42F7784DE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE report ADD CONSTRAINT FK_C42F778425F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_C42F7784762C4B4D ON report (hoard_id)');
$this->addSql('CREATE INDEX IDX_C42F7784DE12AB56 ON report (created_by)');
$this->addSql('CREATE INDEX IDX_C42F778425F94802 ON report (modified_by)');
$this->addSql('ALTER TABLE hide_what CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE hide_what ADD CONSTRAINT FK_C837CFF9DE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE hide_what ADD CONSTRAINT FK_C837CFF925F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_C837CFF9DE12AB56 ON hide_what (created_by)');
$this->addSql('CREATE INDEX IDX_C837CFF925F94802 ON hide_what (modified_by)');
$this->addSql('ALTER TABLE coin_condition CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE coin_condition ADD CONSTRAINT FK_AC1D76D1DE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE coin_condition ADD CONSTRAINT FK_AC1D76D125F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_AC1D76D1DE12AB56 ON coin_condition (created_by)');
$this->addSql('CREATE INDEX IDX_AC1D76D125F94802 ON coin_condition (modified_by)');
$this->addSql('ALTER TABLE period CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE period ADD CONSTRAINT FK_C5B81ECEDE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE period ADD CONSTRAINT FK_C5B81ECE25F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_C5B81ECEDE12AB56 ON period (created_by)');
$this->addSql('CREATE INDEX IDX_C5B81ECE25F94802 ON period (modified_by)');
$this->addSql('ALTER TABLE status CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE status ADD CONSTRAINT FK_7B00651CDE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE status ADD CONSTRAINT FK_7B00651C25F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_7B00651CDE12AB56 ON status (created_by)');
$this->addSql('CREATE INDEX IDX_7B00651C25F94802 ON status (modified_by)');
$this->addSql('ALTER TABLE country CHANGE creation_date creation_date DATETIME NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE country ADD CONSTRAINT FK_5373C966DE12AB56 FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE country ADD CONSTRAINT FK_5373C96625F94802 FOREIGN KEY (modified_by) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_5373C966DE12AB56 ON country (created_by)');
$this->addSql('CREATE INDEX IDX_5373C96625F94802 ON country (modified_by)');
}
/**
* @param Schema $schema
*/
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE coin_image DROP FOREIGN KEY FK_B06A5C387EE4BDB7');
$this->addSql('DROP TABLE coin_image');
$this->addSql('DROP TABLE coin_image_type');
$this->addSql('ALTER TABLE archaeology_context_nature DROP FOREIGN KEY FK_6963BDC5DE12AB56');
$this->addSql('ALTER TABLE archaeology_context_nature DROP FOREIGN KEY FK_6963BDC525F94802');
$this->addSql('DROP INDEX IDX_6963BDC5DE12AB56 ON archaeology_context_nature');
$this->addSql('DROP INDEX IDX_6963BDC525F94802 ON archaeology_context_nature');
$this->addSql('ALTER TABLE archaeology_context_nature CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE archaeology_period DROP FOREIGN KEY FK_4A24B0D5DE12AB56');
$this->addSql('ALTER TABLE archaeology_period DROP FOREIGN KEY FK_4A24B0D525F94802');
$this->addSql('DROP INDEX IDX_4A24B0D5DE12AB56 ON archaeology_period');
$this->addSql('DROP INDEX IDX_4A24B0D525F94802 ON archaeology_period');
$this->addSql('ALTER TABLE archaeology_period CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE archaeology_recovery_method DROP FOREIGN KEY FK_B8416BD1DE12AB56');
$this->addSql('ALTER TABLE archaeology_recovery_method DROP FOREIGN KEY FK_B8416BD125F94802');
$this->addSql('DROP INDEX IDX_B8416BD1DE12AB56 ON archaeology_recovery_method');
$this->addSql('DROP INDEX IDX_B8416BD125F94802 ON archaeology_recovery_method');
$this->addSql('ALTER TABLE archaeology_recovery_method CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE archaeology_site_context DROP FOREIGN KEY FK_A200B6BBDE12AB56');
$this->addSql('ALTER TABLE archaeology_site_context DROP FOREIGN KEY FK_A200B6BB25F94802');
$this->addSql('DROP INDEX IDX_A200B6BBDE12AB56 ON archaeology_site_context');
$this->addSql('DROP INDEX IDX_A200B6BB25F94802 ON archaeology_site_context');
$this->addSql('ALTER TABLE archaeology_site_context CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE archaeology_site_context_detail DROP FOREIGN KEY FK_DEB6A2ACDE12AB56');
$this->addSql('ALTER TABLE archaeology_site_context_detail DROP FOREIGN KEY FK_DEB6A2AC25F94802');
$this->addSql('DROP INDEX IDX_DEB6A2ACDE12AB56 ON archaeology_site_context_detail');
$this->addSql('DROP INDEX IDX_DEB6A2AC25F94802 ON archaeology_site_context_detail');
$this->addSql('ALTER TABLE archaeology_site_context_detail CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE coin DROP FOREIGN KEY FK_5569975D762C4B4D');
$this->addSql('ALTER TABLE coin DROP FOREIGN KEY FK_5569975D887793B6');
$this->addSql('ALTER TABLE coin DROP FOREIGN KEY FK_5569975DBC21F742');
$this->addSql('ALTER TABLE coin DROP FOREIGN KEY FK_5569975DE9293F06');
$this->addSql('ALTER TABLE coin DROP FOREIGN KEY FK_5569975DEA6EFDCD');
$this->addSql('ALTER TABLE coin DROP FOREIGN KEY FK_5569975D3A94E0C');
$this->addSql('ALTER TABLE coin DROP FOREIGN KEY FK_5569975DEC8B7ADE');
$this->addSql('ALTER TABLE coin DROP FOREIGN KEY FK_5569975D217BBB47');
$this->addSql('ALTER TABLE coin DROP FOREIGN KEY FK_5569975D14C9431B');
$this->addSql('ALTER TABLE coin DROP FOREIGN KEY FK_5569975DDE12AB56');
$this->addSql('ALTER TABLE coin DROP FOREIGN KEY FK_5569975D25F94802');
$this->addSql('DROP INDEX IDX_5569975D762C4B4D ON coin');
$this->addSql('DROP INDEX IDX_5569975D887793B6 ON coin');
$this->addSql('DROP INDEX IDX_5569975DBC21F742 ON coin');
$this->addSql('DROP INDEX IDX_5569975DE9293F06 ON coin');
$this->addSql('DROP INDEX IDX_5569975DEA6EFDCD ON coin');
$this->addSql('DROP INDEX IDX_5569975D3A94E0C ON coin');
$this->addSql('DROP INDEX IDX_5569975DEC8B7ADE ON coin');
$this->addSql('DROP INDEX IDX_5569975D217BBB47 ON coin');
$this->addSql('DROP INDEX IDX_5569975D14C9431B ON coin');
$this->addSql('DROP INDEX IDX_5569975DDE12AB56 ON coin');
$this->addSql('DROP INDEX IDX_5569975D25F94802 ON coin');
$this->addSql('ALTER TABLE coin CHANGE quantity quantity INT DEFAULT 1, CHANGE imitation imitation TINYINT(1) DEFAULT \'0\', CHANGE latest_coin latest_coin TINYINT(1) DEFAULT \'0\', CHANGE intruder intruder TINYINT(1) DEFAULT \'0\', CHANGE to_check to_check TINYINT(1) DEFAULT \'0\', CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE coin_condition DROP FOREIGN KEY FK_AC1D76D1DE12AB56');
$this->addSql('ALTER TABLE coin_condition DROP FOREIGN KEY FK_AC1D76D125F94802');
$this->addSql('DROP INDEX IDX_AC1D76D1DE12AB56 ON coin_condition');
$this->addSql('DROP INDEX IDX_AC1D76D125F94802 ON coin_condition');
$this->addSql('ALTER TABLE coin_condition CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE coin_reference DROP FOREIGN KEY FK_B64E413184BBDA7');
$this->addSql('ALTER TABLE coin_reference DROP FOREIGN KEY FK_B64E413138B217A7');
$this->addSql('ALTER TABLE coin_reference DROP FOREIGN KEY FK_B64E4131DE12AB56');
$this->addSql('ALTER TABLE coin_reference DROP FOREIGN KEY FK_B64E413125F94802');
$this->addSql('DROP INDEX IDX_B64E413184BBDA7 ON coin_reference');
$this->addSql('DROP INDEX IDX_B64E413138B217A7 ON coin_reference');
$this->addSql('DROP INDEX IDX_B64E4131DE12AB56 ON coin_reference');
$this->addSql('DROP INDEX IDX_B64E413125F94802 ON coin_reference');
$this->addSql('ALTER TABLE coin_reference CHANGE this_specimen this_specimen TINYINT(1) DEFAULT \'0\', CHANGE creation_date creation_date DATETIME DEFAULT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE container DROP FOREIGN KEY FK_C7A2EC1B1385F01');
$this->addSql('ALTER TABLE container DROP FOREIGN KEY FK_C7A2EC1BC18E1F30');
$this->addSql('ALTER TABLE container DROP FOREIGN KEY FK_C7A2EC1B762C4B4D');
$this->addSql('ALTER TABLE container DROP FOREIGN KEY FK_C7A2EC1BE308AC6F');
$this->addSql('ALTER TABLE container DROP FOREIGN KEY FK_C7A2EC1BDE12AB56');
$this->addSql('ALTER TABLE container DROP FOREIGN KEY FK_C7A2EC1B25F94802');
$this->addSql('DROP INDEX IDX_C7A2EC1B1385F01 ON container');
$this->addSql('DROP INDEX IDX_C7A2EC1BC18E1F30 ON container');
$this->addSql('DROP INDEX IDX_C7A2EC1B762C4B4D ON container');
$this->addSql('DROP INDEX IDX_C7A2EC1BE308AC6F ON container');
$this->addSql('DROP INDEX IDX_C7A2EC1BDE12AB56 ON container');
$this->addSql('DROP INDEX IDX_C7A2EC1B25F94802 ON container');
$this->addSql('ALTER TABLE container CHANGE creation_date creation_date DATETIME DEFAULT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE container_form DROP FOREIGN KEY FK_DA731DC0DE12AB56');
$this->addSql('ALTER TABLE container_form DROP FOREIGN KEY FK_DA731DC025F94802');
$this->addSql('DROP INDEX IDX_DA731DC0DE12AB56 ON container_form');
$this->addSql('DROP INDEX IDX_DA731DC025F94802 ON container_form');
$this->addSql('ALTER TABLE container_form CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE container_sherd DROP FOREIGN KEY FK_E2876041DE12AB56');
$this->addSql('ALTER TABLE container_sherd DROP FOREIGN KEY FK_E287604125F94802');
$this->addSql('DROP INDEX IDX_E2876041DE12AB56 ON container_sherd');
$this->addSql('DROP INDEX IDX_E287604125F94802 ON container_sherd');
$this->addSql('ALTER TABLE container_sherd CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE country DROP FOREIGN KEY FK_5373C966DE12AB56');
$this->addSql('ALTER TABLE country DROP FOREIGN KEY FK_5373C96625F94802');
$this->addSql('DROP INDEX IDX_5373C966DE12AB56 ON country');
$this->addSql('DROP INDEX IDX_5373C96625F94802 ON country');
$this->addSql('ALTER TABLE country CHANGE creation_date creation_date DATETIME DEFAULT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE denomination DROP FOREIGN KEY FK_15AEA10CE308AC6F');
$this->addSql('ALTER TABLE denomination DROP FOREIGN KEY FK_15AEA10CDE12AB56');
$this->addSql('ALTER TABLE denomination DROP FOREIGN KEY FK_15AEA10C25F94802');
$this->addSql('DROP INDEX IDX_15AEA10CE308AC6F ON denomination');
$this->addSql('DROP INDEX IDX_15AEA10CDE12AB56 ON denomination');
$this->addSql('DROP INDEX IDX_15AEA10C25F94802 ON denomination');
$this->addSql('ALTER TABLE denomination CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE discovery_land_use DROP FOREIGN KEY FK_41C1244FDE12AB56');
$this->addSql('ALTER TABLE discovery_land_use DROP FOREIGN KEY FK_41C1244F25F94802');
$this->addSql('DROP INDEX IDX_41C1244FDE12AB56 ON discovery_land_use');
$this->addSql('DROP INDEX IDX_41C1244F25F94802 ON discovery_land_use');
$this->addSql('ALTER TABLE discovery_land_use CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE discovery_method DROP FOREIGN KEY FK_3C633F5FDE12AB56');
$this->addSql('ALTER TABLE discovery_method DROP FOREIGN KEY FK_3C633F5F25F94802');
$this->addSql('DROP INDEX IDX_3C633F5FDE12AB56 ON discovery_method');
$this->addSql('DROP INDEX IDX_3C633F5F25F94802 ON discovery_method');
$this->addSql('ALTER TABLE discovery_method CHANGE creation_date creation_date DATETIME DEFAULT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE find_spot_location_detail DROP FOREIGN KEY FK_EFB055F1DE12AB56');
$this->addSql('ALTER TABLE find_spot_location_detail DROP FOREIGN KEY FK_EFB055F125F94802');
$this->addSql('DROP INDEX IDX_EFB055F1DE12AB56 ON find_spot_location_detail');
$this->addSql('DROP INDEX IDX_EFB055F125F94802 ON find_spot_location_detail');
$this->addSql('ALTER TABLE find_spot_location_detail CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE hide_from DROP FOREIGN KEY FK_CBCB5CEBDE12AB56');
$this->addSql('ALTER TABLE hide_from DROP FOREIGN KEY FK_CBCB5CEB25F94802');
$this->addSql('DROP INDEX IDX_CBCB5CEBDE12AB56 ON hide_from');
$this->addSql('DROP INDEX IDX_CBCB5CEB25F94802 ON hide_from');
$this->addSql('ALTER TABLE hide_from CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE hide_what DROP FOREIGN KEY FK_C837CFF9DE12AB56');
$this->addSql('ALTER TABLE hide_what DROP FOREIGN KEY FK_C837CFF925F94802');
$this->addSql('DROP INDEX IDX_C837CFF9DE12AB56 ON hide_what');
$this->addSql('DROP INDEX IDX_C837CFF925F94802 ON hide_what');
$this->addSql('ALTER TABLE hide_what CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE hoard DROP FOREIGN KEY FK_12E633E6B70DC2BA');
$this->addSql('ALTER TABLE hoard DROP FOREIGN KEY FK_12E633E6F92F3E70');
$this->addSql('ALTER TABLE hoard DROP FOREIGN KEY FK_12E633E6DEEAC6A5');
$this->addSql('ALTER TABLE hoard DROP FOREIGN KEY FK_12E633E634AABBD4');
$this->addSql('ALTER TABLE hoard DROP FOREIGN KEY FK_12E633E6261F143A');
$this->addSql('ALTER TABLE hoard DROP FOREIGN KEY FK_12E633E68DC4B65F');
$this->addSql('ALTER TABLE hoard DROP FOREIGN KEY FK_12E633E6C1C0C');
$this->addSql('ALTER TABLE hoard DROP FOREIGN KEY FK_12E633E66DD859E5');
$this->addSql('ALTER TABLE hoard DROP FOREIGN KEY FK_12E633E61DD5DD5D');
$this->addSql('ALTER TABLE hoard DROP FOREIGN KEY FK_12E633E6810A938');
$this->addSql('ALTER TABLE hoard DROP FOREIGN KEY FK_12E633E635C578C8');
$this->addSql('ALTER TABLE hoard DROP FOREIGN KEY FK_12E633E674F571E5');
$this->addSql('ALTER TABLE hoard DROP FOREIGN KEY FK_12E633E698581200');
$this->addSql('ALTER TABLE hoard DROP FOREIGN KEY FK_12E633E6AAD3DF75');
$this->addSql('ALTER TABLE hoard DROP FOREIGN KEY FK_12E633E6D37CEDD0');
$this->addSql('ALTER TABLE hoard DROP FOREIGN KEY FK_12E633E6DDF9AE8B');
$this->addSql('ALTER TABLE hoard DROP FOREIGN KEY FK_12E633E6A32EFC6');
$this->addSql('ALTER TABLE hoard DROP FOREIGN KEY FK_12E633E6288BE329');
$this->addSql('ALTER TABLE hoard DROP FOREIGN KEY FK_12E633E6D94EF3DA');
$this->addSql('ALTER TABLE hoard DROP FOREIGN KEY FK_12E633E6DE12AB56');
$this->addSql('ALTER TABLE hoard DROP FOREIGN KEY FK_12E633E625F94802');
$this->addSql('ALTER TABLE hoard CHANGE hoard_type_id hoard_type_id INT DEFAULT 1, CHANGE hide_what_id hide_what_id INT DEFAULT 1 NOT NULL, CHANGE hide_from_id hide_from_id INT DEFAULT 1 NOT NULL, CHANGE to_enter_at_coin_level to_enter_at_coin_level TINYINT(1) DEFAULT \'0\', CHANGE validated_by_user validated_by_user TINYINT(1) DEFAULT \'0\', CHANGE validated_by_admin validated_by_admin TINYINT(1) DEFAULT \'0\', CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE hoard_image DROP FOREIGN KEY FK_852FBBF0762C4B4D');
$this->addSql('ALTER TABLE hoard_image DROP FOREIGN KEY FK_852FBBF03DA5256D');
$this->addSql('ALTER TABLE hoard_image DROP FOREIGN KEY FK_852FBBF0DE12AB56');
$this->addSql('ALTER TABLE hoard_image DROP FOREIGN KEY FK_852FBBF025F94802');
$this->addSql('DROP INDEX IDX_852FBBF0762C4B4D ON hoard_image');
$this->addSql('DROP INDEX IDX_852FBBF03DA5256D ON hoard_image');
$this->addSql('DROP INDEX IDX_852FBBF0DE12AB56 ON hoard_image');
$this->addSql('DROP INDEX IDX_852FBBF025F94802 ON hoard_image');
$this->addSql('ALTER TABLE hoard_image CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE hoard_reference DROP FOREIGN KEY FK_5F6B4953762C4B4D');
$this->addSql('ALTER TABLE hoard_reference DROP FOREIGN KEY FK_5F6B495338B217A7');
$this->addSql('ALTER TABLE hoard_reference DROP FOREIGN KEY FK_5F6B4953DE12AB56');
$this->addSql('ALTER TABLE hoard_reference DROP FOREIGN KEY FK_5F6B495325F94802');
$this->addSql('DROP INDEX IDX_5F6B4953762C4B4D ON hoard_reference');
$this->addSql('DROP INDEX IDX_5F6B495338B217A7 ON hoard_reference');
$this->addSql('DROP INDEX IDX_5F6B4953DE12AB56 ON hoard_reference');
$this->addSql('DROP INDEX IDX_5F6B495325F94802 ON hoard_reference');
$this->addSql('ALTER TABLE hoard_reference CHANGE hoard_id hoard_id INT NOT NULL, CHANGE reference_id reference_id INT NOT NULL, CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE hoard_type DROP FOREIGN KEY FK_416A9EC3DE12AB56');
$this->addSql('ALTER TABLE hoard_type DROP FOREIGN KEY FK_416A9EC325F94802');
$this->addSql('DROP INDEX IDX_416A9EC3DE12AB56 ON hoard_type');
$this->addSql('DROP INDEX IDX_416A9EC325F94802 ON hoard_type');
$this->addSql('ALTER TABLE hoard_type CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE image DROP FOREIGN KEY FK_C53D045FDE12AB56');
$this->addSql('ALTER TABLE image DROP FOREIGN KEY FK_C53D045F25F94802');
$this->addSql('DROP INDEX IDX_C53D045FDE12AB56 ON image');
$this->addSql('DROP INDEX IDX_C53D045F25F94802 ON image');
$this->addSql('ALTER TABLE image CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE layer DROP FOREIGN KEY FK_E4DB211ABC21F742');
$this->addSql('ALTER TABLE layer DROP FOREIGN KEY FK_E4DB211ADE12AB56');
$this->addSql('ALTER TABLE layer DROP FOREIGN KEY FK_E4DB211A25F94802');
$this->addSql('DROP INDEX IDX_E4DB211ABC21F742 ON layer');
$this->addSql('DROP INDEX IDX_E4DB211ADE12AB56 ON layer');
$this->addSql('DROP INDEX IDX_E4DB211A25F94802 ON layer');
$this->addSql('ALTER TABLE layer CHANGE creation_date creation_date DATETIME DEFAULT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE material DROP FOREIGN KEY FK_7CBE7595DE12AB56');
$this->addSql('ALTER TABLE material DROP FOREIGN KEY FK_7CBE759525F94802');
$this->addSql('DROP INDEX IDX_7CBE7595DE12AB56 ON material');
$this->addSql('DROP INDEX IDX_7CBE759525F94802 ON material');
$this->addSql('ALTER TABLE material CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE mint DROP FOREIGN KEY FK_318F361EC8B7ADE');
$this->addSql('ALTER TABLE mint DROP FOREIGN KEY FK_318F361DE12AB56');
$this->addSql('ALTER TABLE mint DROP FOREIGN KEY FK_318F36125F94802');
$this->addSql('DROP INDEX IDX_318F361EC8B7ADE ON mint');
$this->addSql('DROP INDEX IDX_318F361DE12AB56 ON mint');
$this->addSql('DROP INDEX IDX_318F36125F94802 ON mint');
$this->addSql('ALTER TABLE mint CHANGE creation_date creation_date DATETIME DEFAULT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE object DROP FOREIGN KEY FK_A8ADABEC762C4B4D');
$this->addSql('ALTER TABLE object DROP FOREIGN KEY FK_A8ADABECBC21F742');
$this->addSql('ALTER TABLE object DROP FOREIGN KEY FK_A8ADABECE308AC6F');
$this->addSql('ALTER TABLE object DROP FOREIGN KEY FK_A8ADABECDE12AB56');
$this->addSql('ALTER TABLE object DROP FOREIGN KEY FK_A8ADABEC25F94802');
$this->addSql('DROP INDEX IDX_A8ADABEC762C4B4D ON object');
$this->addSql('DROP INDEX IDX_A8ADABECBC21F742 ON object');
$this->addSql('DROP INDEX IDX_A8ADABECE308AC6F ON object');
$this->addSql('DROP INDEX IDX_A8ADABECDE12AB56 ON object');
$this->addSql('DROP INDEX IDX_A8ADABEC25F94802 ON object');
$this->addSql('ALTER TABLE object CHANGE hoard_id hoard_id INT NOT NULL, CHANGE creation_date creation_date DATETIME DEFAULT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE object_reference DROP FOREIGN KEY FK_6D980777232D562B');
$this->addSql('ALTER TABLE object_reference DROP FOREIGN KEY FK_6D98077738B217A7');
$this->addSql('ALTER TABLE object_reference DROP FOREIGN KEY FK_6D980777DE12AB56');
$this->addSql('ALTER TABLE object_reference DROP FOREIGN KEY FK_6D98077725F94802');
$this->addSql('DROP INDEX IDX_6D980777232D562B ON object_reference');
$this->addSql('DROP INDEX IDX_6D98077738B217A7 ON object_reference');
$this->addSql('DROP INDEX IDX_6D980777DE12AB56 ON object_reference');
$this->addSql('DROP INDEX IDX_6D98077725F94802 ON object_reference');
$this->addSql('ALTER TABLE object_reference CHANGE this_object this_object TINYINT(1) DEFAULT \'0\', CHANGE creation_date creation_date DATETIME DEFAULT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE period DROP FOREIGN KEY FK_C5B81ECEDE12AB56');
$this->addSql('ALTER TABLE period DROP FOREIGN KEY FK_C5B81ECE25F94802');
$this->addSql('DROP INDEX IDX_C5B81ECEDE12AB56 ON period');
$this->addSql('DROP INDEX IDX_C5B81ECE25F94802 ON period');
$this->addSql('ALTER TABLE period CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE person DROP FOREIGN KEY FK_34DCD176B7EB593A');
$this->addSql('ALTER TABLE person DROP FOREIGN KEY FK_34DCD176A55EF6D4');
$this->addSql('ALTER TABLE person DROP FOREIGN KEY FK_34DCD176DE12AB56');
$this->addSql('ALTER TABLE person DROP FOREIGN KEY FK_34DCD17625F94802');
$this->addSql('DROP INDEX IDX_34DCD176B7EB593A ON person');
$this->addSql('DROP INDEX IDX_34DCD176A55EF6D4 ON person');
$this->addSql('DROP INDEX IDX_34DCD176DE12AB56 ON person');
$this->addSql('DROP INDEX IDX_34DCD17625F94802 ON person');
$this->addSql('ALTER TABLE person CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE reference DROP FOREIGN KEY FK_AF3C6779CDC55AAF');
$this->addSql('ALTER TABLE reference DROP FOREIGN KEY FK_AF3C6779DE12AB56');
$this->addSql('ALTER TABLE reference DROP FOREIGN KEY FK_AF3C677925F94802');
$this->addSql('DROP INDEX IDX_AF3C6779CDC55AAF ON reference');
$this->addSql('DROP INDEX IDX_AF3C6779DE12AB56 ON reference');
$this->addSql('DROP INDEX IDX_AF3C677925F94802 ON reference');
$this->addSql('ALTER TABLE reference CHANGE fully_entered fully_entered TINYINT(1) DEFAULT \'0\', CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE reference_type DROP FOREIGN KEY FK_8726D6E4DE12AB56');
$this->addSql('ALTER TABLE reference_type DROP FOREIGN KEY FK_8726D6E425F94802');
$this->addSql('DROP INDEX IDX_8726D6E4DE12AB56 ON reference_type');
$this->addSql('DROP INDEX IDX_8726D6E425F94802 ON reference_type');
$this->addSql('ALTER TABLE reference_type CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE rating DROP FOREIGN KEY FK_D8892622DE12AB56');
$this->addSql('ALTER TABLE rating DROP FOREIGN KEY FK_D889262225F94802');
$this->addSql('DROP INDEX IDX_D8892622DE12AB56 ON rating');
$this->addSql('DROP INDEX IDX_D889262225F94802 ON rating');
$this->addSql('ALTER TABLE rating CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE reign DROP FOREIGN KEY FK_8E780213B7EB593A');
$this->addSql('ALTER TABLE reign DROP FOREIGN KEY FK_8E780213A55EF6D4');
$this->addSql('ALTER TABLE reign DROP FOREIGN KEY FK_8E780213DE12AB56');
$this->addSql('ALTER TABLE reign DROP FOREIGN KEY FK_8E78021325F94802');
$this->addSql('DROP INDEX IDX_8E780213B7EB593A ON reign');
$this->addSql('DROP INDEX IDX_8E780213A55EF6D4 ON reign');
$this->addSql('DROP INDEX IDX_8E780213DE12AB56 ON reign');
$this->addSql('DROP INDEX IDX_8E78021325F94802 ON reign');
$this->addSql('ALTER TABLE reign CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE report DROP FOREIGN KEY FK_C42F7784762C4B4D');
$this->addSql('ALTER TABLE report DROP FOREIGN KEY FK_C42F7784DE12AB56');
$this->addSql('ALTER TABLE report DROP FOREIGN KEY FK_C42F778425F94802');
$this->addSql('DROP INDEX IDX_C42F7784762C4B4D ON report');
$this->addSql('DROP INDEX IDX_C42F7784DE12AB56 ON report');
$this->addSql('DROP INDEX IDX_C42F778425F94802 ON report');
$this->addSql('ALTER TABLE report CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE status DROP FOREIGN KEY FK_7B00651CDE12AB56');
$this->addSql('ALTER TABLE status DROP FOREIGN KEY FK_7B00651C25F94802');
$this->addSql('DROP INDEX IDX_7B00651CDE12AB56 ON status');
$this->addSql('DROP INDEX IDX_7B00651C25F94802 ON status');
$this->addSql('ALTER TABLE status CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649DE12AB56');
$this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D64925F94802');
$this->addSql('DROP INDEX UNIQ_8D93D64992FC23A8 ON user');
$this->addSql('DROP INDEX UNIQ_8D93D649A0D96FBF ON user');
$this->addSql('DROP INDEX IDX_8D93D649DE12AB56 ON user');
$this->addSql('DROP INDEX IDX_8D93D64925F94802 ON user');
$this->addSql('ALTER TABLE user DROP username, DROP username_canonical, DROP email, DROP email_canonical, DROP enabled, DROP salt, DROP last_login, DROP locked, DROP expired, DROP expires_at, DROP password_requested_at, DROP roles, DROP credentials_expired, DROP credentials_expire_at, CHANGE password password VARCHAR(255) DEFAULT NULL, CHANGE administrator administrator TINYINT(1) DEFAULT \'0\', CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\', CHANGE confirmation_token login VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE user_country DROP FOREIGN KEY FK_B7ED76CF92F3E70');
$this->addSql('ALTER TABLE user_country DROP FOREIGN KEY FK_B7ED76CA76ED395');
$this->addSql('ALTER TABLE user_country DROP FOREIGN KEY FK_B7ED76CDE12AB56');
$this->addSql('ALTER TABLE user_country DROP FOREIGN KEY FK_B7ED76C25F94802');
$this->addSql('DROP INDEX IDX_B7ED76CF92F3E70 ON user_country');
$this->addSql('DROP INDEX IDX_B7ED76CA76ED395 ON user_country');
$this->addSql('DROP INDEX IDX_B7ED76CDE12AB56 ON user_country');
$this->addSql('DROP INDEX IDX_B7ED76C25F94802 ON user_country');
$this->addSql('ALTER TABLE user_country CHANGE can_edit can_edit TINYINT(1) DEFAULT \'0\', CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
$this->addSql('ALTER TABLE user_hoard DROP FOREIGN KEY FK_F024C8BE762C4B4D');
$this->addSql('ALTER TABLE user_hoard DROP FOREIGN KEY FK_F024C8BEA76ED395');
$this->addSql('ALTER TABLE user_hoard DROP FOREIGN KEY FK_F024C8BEDE12AB56');
$this->addSql('ALTER TABLE user_hoard DROP FOREIGN KEY FK_F024C8BE25F94802');
$this->addSql('DROP INDEX IDX_F024C8BE762C4B4D ON user_hoard');
$this->addSql('DROP INDEX IDX_F024C8BEA76ED395 ON user_hoard');
$this->addSql('DROP INDEX IDX_F024C8BEDE12AB56 ON user_hoard');
$this->addSql('DROP INDEX IDX_F024C8BE25F94802 ON user_hoard');
$this->addSql('ALTER TABLE user_hoard CHANGE can_edit can_edit TINYINT(1) DEFAULT \'0\', CHANGE creation_date creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE deleted deleted TINYINT(1) DEFAULT \'0\'');
}
}