migrations/Version20220418202429.php line 1

  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20220418202429 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         // this up() migration is auto-generated, please modify it to your needs
  18.         $this->addSql('CREATE TABLE g (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)');
  19.         $this->addSql('CREATE TABLE postman (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, message_id INTEGER NOT NULL, recipient_id INTEGER NOT NULL)');
  20.         $this->addSql('CREATE INDEX IDX_446A51C4537A1329 ON postman (message_id)');
  21.         $this->addSql('CREATE INDEX IDX_446A51C4E92F8F78 ON postman (recipient_id)');
  22.         $this->addSql('DROP INDEX IDX_4966C724DA6A219');
  23.         $this->addSql('CREATE TEMPORARY TABLE __temp__artifact_entity AS SELECT id, place_id, name, hp_max, hp, description FROM artifact_entity');
  24.         $this->addSql('DROP TABLE artifact_entity');
  25.         $this->addSql('CREATE TABLE artifact_entity (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, place_id INTEGER DEFAULT NULL, name VARCHAR(255) NOT NULL, hp_max INTEGER NOT NULL, hp INTEGER NOT NULL, description CLOB DEFAULT NULL --(DC2Type:array)
  26.         , CONSTRAINT FK_4966C724DA6A219 FOREIGN KEY (place_id) REFERENCES place (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
  27.         $this->addSql('INSERT INTO artifact_entity (id, place_id, name, hp_max, hp, description) SELECT id, place_id, name, hp_max, hp, description FROM __temp__artifact_entity');
  28.         $this->addSql('DROP TABLE __temp__artifact_entity');
  29.         $this->addSql('CREATE INDEX IDX_4966C724DA6A219 ON artifact_entity (place_id)');
  30.         $this->addSql('DROP INDEX IDX_582BD22ADA6A219');
  31.         $this->addSql('DROP INDEX IDX_582BD22A796FAEA1');
  32.         $this->addSql('CREATE TEMPORARY TABLE __temp__artifact_entity_place AS SELECT artifact_entity_id, place_id FROM artifact_entity_place');
  33.         $this->addSql('DROP TABLE artifact_entity_place');
  34.         $this->addSql('CREATE TABLE artifact_entity_place (artifact_entity_id INTEGER NOT NULL, place_id INTEGER NOT NULL, PRIMARY KEY(artifact_entity_id, place_id), CONSTRAINT FK_582BD22A796FAEA1 FOREIGN KEY (artifact_entity_id) REFERENCES artifact_entity (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_582BD22ADA6A219 FOREIGN KEY (place_id) REFERENCES place (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)');
  35.         $this->addSql('INSERT INTO artifact_entity_place (artifact_entity_id, place_id) SELECT artifact_entity_id, place_id FROM __temp__artifact_entity_place');
  36.         $this->addSql('DROP TABLE __temp__artifact_entity_place');
  37.         $this->addSql('CREATE INDEX IDX_582BD22ADA6A219 ON artifact_entity_place (place_id)');
  38.         $this->addSql('CREATE INDEX IDX_582BD22A796FAEA1 ON artifact_entity_place (artifact_entity_id)');
  39.         $this->addSql('DROP INDEX IDX_B6BD307F2239FAB1');
  40.         $this->addSql('DROP INDEX IDX_B6BD307FD1741030');
  41.         $this->addSql('CREATE TEMPORARY TABLE __temp__message AS SELECT id, place_origin_id, playable_entity_origin_id, date_time, content FROM message');
  42.         $this->addSql('DROP TABLE message');
  43.         $this->addSql('CREATE TABLE message (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, place_origin_id INTEGER DEFAULT NULL, playable_entity_origin_id INTEGER DEFAULT NULL, date_time DATETIME NOT NULL --(DC2Type:datetime_immutable)
  44.         , content CLOB NOT NULL, CONSTRAINT FK_B6BD307F2239FAB1 FOREIGN KEY (place_origin_id) REFERENCES place (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_B6BD307FD1741030 FOREIGN KEY (playable_entity_origin_id) REFERENCES playable_entity (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
  45.         $this->addSql('INSERT INTO message (id, place_origin_id, playable_entity_origin_id, date_time, content) SELECT id, place_origin_id, playable_entity_origin_id, date_time, content FROM __temp__message');
  46.         $this->addSql('DROP TABLE __temp__message');
  47.         $this->addSql('CREATE INDEX IDX_B6BD307F2239FAB1 ON message (place_origin_id)');
  48.         $this->addSql('CREATE INDEX IDX_B6BD307FD1741030 ON message (playable_entity_origin_id)');
  49.         $this->addSql('DROP INDEX IDX_B548B0F56A273CC');
  50.         $this->addSql('DROP INDEX IDX_B548B0F816C6140');
  51.         $this->addSql('CREATE TEMPORARY TABLE __temp__path AS SELECT id, origin_id, destination_id, name, position FROM path');
  52.         $this->addSql('DROP TABLE path');
  53.         $this->addSql('CREATE TABLE path (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, origin_id INTEGER NOT NULL, destination_id INTEGER NOT NULL, name VARCHAR(255) NOT NULL, position SMALLINT NOT NULL, CONSTRAINT FK_B548B0F56A273CC FOREIGN KEY (origin_id) REFERENCES place (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_B548B0F816C6140 FOREIGN KEY (destination_id) REFERENCES place (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
  54.         $this->addSql('INSERT INTO path (id, origin_id, destination_id, name, position) SELECT id, origin_id, destination_id, name, position FROM __temp__path');
  55.         $this->addSql('DROP TABLE __temp__path');
  56.         $this->addSql('CREATE INDEX IDX_B548B0F56A273CC ON path (origin_id)');
  57.         $this->addSql('CREATE INDEX IDX_B548B0F816C6140 ON path (destination_id)');
  58.         $this->addSql('DROP INDEX IDX_63110882DA6A219');
  59.         $this->addSql('CREATE TEMPORARY TABLE __temp__place_description AS SELECT id, place_id, text, language, datetime FROM place_description');
  60.         $this->addSql('DROP TABLE place_description');
  61.         $this->addSql('CREATE TABLE place_description (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, place_id INTEGER NOT NULL, text CLOB NOT NULL, language VARCHAR(10) NOT NULL, datetime DATETIME NOT NULL --(DC2Type:datetime_immutable)
  62.         , CONSTRAINT FK_63110882DA6A219 FOREIGN KEY (place_id) REFERENCES place (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
  63.         $this->addSql('INSERT INTO place_description (id, place_id, text, language, datetime) SELECT id, place_id, text, language, datetime FROM __temp__place_description');
  64.         $this->addSql('DROP TABLE __temp__place_description');
  65.         $this->addSql('CREATE INDEX IDX_63110882DA6A219 ON place_description (place_id)');
  66.         $this->addSql('DROP INDEX IDX_114242BE99E6F5DF');
  67.         $this->addSql('DROP INDEX IDX_114242BEDA6A219');
  68.         $this->addSql('CREATE TEMPORARY TABLE __temp__playable_entity AS SELECT id, player_id, place_id, name, gender, trombinoscope, size, hp, ap, max_hp, max_ap, armor_class, agility, charisma, intelligence, perception, strength, skills, abilities, known_magicskills, known_attackskills, known_craftskills, race FROM playable_entity');
  69.         $this->addSql('DROP TABLE playable_entity');
  70.         $this->addSql('CREATE TABLE playable_entity (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, player_id INTEGER DEFAULT NULL, place_id INTEGER DEFAULT NULL, name VARCHAR(255) NOT NULL, gender SMALLINT NOT NULL, trombinoscope CLOB DEFAULT NULL --(DC2Type:array)
  71.         , size SMALLINT NOT NULL, hp INTEGER NOT NULL, ap INTEGER NOT NULL, max_hp INTEGER NOT NULL, max_ap INTEGER NOT NULL, armor_class INTEGER NOT NULL, agility INTEGER NOT NULL, charisma INTEGER NOT NULL, intelligence INTEGER NOT NULL, perception INTEGER NOT NULL, strength INTEGER NOT NULL, skills CLOB DEFAULT NULL --(DC2Type:array)
  72.         , abilities CLOB DEFAULT NULL --(DC2Type:array)
  73.         , known_magicskills CLOB DEFAULT NULL --(DC2Type:array)
  74.         , known_attackskills CLOB DEFAULT NULL --(DC2Type:array)
  75.         , known_craftskills CLOB DEFAULT NULL --(DC2Type:array)
  76.         , race VARCHAR(255) NOT NULL, CONSTRAINT FK_114242BE99E6F5DF FOREIGN KEY (player_id) REFERENCES user (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_114242BEDA6A219 FOREIGN KEY (place_id) REFERENCES place (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
  77.         $this->addSql('INSERT INTO playable_entity (id, player_id, place_id, name, gender, trombinoscope, size, hp, ap, max_hp, max_ap, armor_class, agility, charisma, intelligence, perception, strength, skills, abilities, known_magicskills, known_attackskills, known_craftskills, race) SELECT id, player_id, place_id, name, gender, trombinoscope, size, hp, ap, max_hp, max_ap, armor_class, agility, charisma, intelligence, perception, strength, skills, abilities, known_magicskills, known_attackskills, known_craftskills, race FROM __temp__playable_entity');
  78.         $this->addSql('DROP TABLE __temp__playable_entity');
  79.         $this->addSql('CREATE INDEX IDX_114242BE99E6F5DF ON playable_entity (player_id)');
  80.         $this->addSql('CREATE INDEX IDX_114242BEDA6A219 ON playable_entity (place_id)');
  81.         $this->addSql('DROP INDEX IDX_15659A3F31C1B00');
  82.         $this->addSql('CREATE TEMPORARY TABLE __temp__playable_entity_description AS SELECT id, playable_entity_id, text, language, datetime FROM playable_entity_description');
  83.         $this->addSql('DROP TABLE playable_entity_description');
  84.         $this->addSql('CREATE TABLE playable_entity_description (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, playable_entity_id INTEGER DEFAULT NULL, text CLOB NOT NULL, language VARCHAR(10) NOT NULL, datetime DATETIME NOT NULL --(DC2Type:datetime_immutable)
  85.         , CONSTRAINT FK_15659A3F31C1B00 FOREIGN KEY (playable_entity_id) REFERENCES playable_entity (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
  86.         $this->addSql('INSERT INTO playable_entity_description (id, playable_entity_id, text, language, datetime) SELECT id, playable_entity_id, text, language, datetime FROM __temp__playable_entity_description');
  87.         $this->addSql('DROP TABLE __temp__playable_entity_description');
  88.         $this->addSql('CREATE INDEX IDX_15659A3F31C1B00 ON playable_entity_description (playable_entity_id)');
  89.         $this->addSql('DROP INDEX IDX_86A7E937DA6A219');
  90.         $this->addSql('CREATE TEMPORARY TABLE __temp__unplayable_entity AS SELECT id, place_id, name, hp, hp_max, ap, ap_max, armor_class, description FROM unplayable_entity');
  91.         $this->addSql('DROP TABLE unplayable_entity');
  92.         $this->addSql('CREATE TABLE unplayable_entity (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, place_id INTEGER DEFAULT NULL, name VARCHAR(255) NOT NULL, hp INTEGER NOT NULL, hp_max INTEGER NOT NULL, ap INTEGER NOT NULL, ap_max INTEGER NOT NULL, armor_class INTEGER NOT NULL, description CLOB DEFAULT NULL --(DC2Type:array)
  93.         , CONSTRAINT FK_86A7E937DA6A219 FOREIGN KEY (place_id) REFERENCES place (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
  94.         $this->addSql('INSERT INTO unplayable_entity (id, place_id, name, hp, hp_max, ap, ap_max, armor_class, description) SELECT id, place_id, name, hp, hp_max, ap, ap_max, armor_class, description FROM __temp__unplayable_entity');
  95.         $this->addSql('DROP TABLE __temp__unplayable_entity');
  96.         $this->addSql('CREATE INDEX IDX_86A7E937DA6A219 ON unplayable_entity (place_id)');
  97.         $this->addSql('DROP INDEX UNIQ_8D93D6491136BE75');
  98.         $this->addSql('DROP INDEX UNIQ_8D93D649E7927C74');
  99.         $this->addSql('CREATE TEMPORARY TABLE __temp__user AS SELECT id, character_id, email, roles, password, nickname FROM user');
  100.         $this->addSql('DROP TABLE user');
  101.         $this->addSql('CREATE TABLE user (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, character_id INTEGER DEFAULT NULL, email VARCHAR(180) NOT NULL, roles CLOB NOT NULL --(DC2Type:json)
  102.         , password VARCHAR(255) NOT NULL, nickname VARCHAR(255) NOT NULL, CONSTRAINT FK_8D93D6491136BE75 FOREIGN KEY (character_id) REFERENCES playable_entity (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
  103.         $this->addSql('INSERT INTO user (id, character_id, email, roles, password, nickname) SELECT id, character_id, email, roles, password, nickname FROM __temp__user');
  104.         $this->addSql('DROP TABLE __temp__user');
  105.         $this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D6491136BE75 ON user (character_id)');
  106.         $this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D649E7927C74 ON user (email)');
  107.     }
  108.     public function down(Schema $schema): void
  109.     {
  110.         // this down() migration is auto-generated, please modify it to your needs
  111.         $this->addSql('DROP TABLE g');
  112.         $this->addSql('DROP TABLE postman');
  113.         $this->addSql('DROP INDEX IDX_4966C724DA6A219');
  114.         $this->addSql('CREATE TEMPORARY TABLE __temp__artifact_entity AS SELECT id, place_id, name, hp_max, hp, description FROM artifact_entity');
  115.         $this->addSql('DROP TABLE artifact_entity');
  116.         $this->addSql('CREATE TABLE artifact_entity (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, place_id INTEGER DEFAULT NULL, name VARCHAR(255) NOT NULL, hp_max INTEGER NOT NULL, hp INTEGER NOT NULL, description CLOB DEFAULT NULL --(DC2Type:array)
  117.         )');
  118.         $this->addSql('INSERT INTO artifact_entity (id, place_id, name, hp_max, hp, description) SELECT id, place_id, name, hp_max, hp, description FROM __temp__artifact_entity');
  119.         $this->addSql('DROP TABLE __temp__artifact_entity');
  120.         $this->addSql('CREATE INDEX IDX_4966C724DA6A219 ON artifact_entity (place_id)');
  121.         $this->addSql('DROP INDEX IDX_582BD22A796FAEA1');
  122.         $this->addSql('DROP INDEX IDX_582BD22ADA6A219');
  123.         $this->addSql('CREATE TEMPORARY TABLE __temp__artifact_entity_place AS SELECT artifact_entity_id, place_id FROM artifact_entity_place');
  124.         $this->addSql('DROP TABLE artifact_entity_place');
  125.         $this->addSql('CREATE TABLE artifact_entity_place (artifact_entity_id INTEGER NOT NULL, place_id INTEGER NOT NULL, PRIMARY KEY(artifact_entity_id, place_id))');
  126.         $this->addSql('INSERT INTO artifact_entity_place (artifact_entity_id, place_id) SELECT artifact_entity_id, place_id FROM __temp__artifact_entity_place');
  127.         $this->addSql('DROP TABLE __temp__artifact_entity_place');
  128.         $this->addSql('CREATE INDEX IDX_582BD22A796FAEA1 ON artifact_entity_place (artifact_entity_id)');
  129.         $this->addSql('CREATE INDEX IDX_582BD22ADA6A219 ON artifact_entity_place (place_id)');
  130.         $this->addSql('DROP INDEX IDX_B6BD307F2239FAB1');
  131.         $this->addSql('DROP INDEX IDX_B6BD307FD1741030');
  132.         $this->addSql('CREATE TEMPORARY TABLE __temp__message AS SELECT id, place_origin_id, playable_entity_origin_id, date_time, content FROM message');
  133.         $this->addSql('DROP TABLE message');
  134.         $this->addSql('CREATE TABLE message (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, place_origin_id INTEGER DEFAULT NULL, playable_entity_origin_id INTEGER DEFAULT NULL, date_time DATETIME NOT NULL --(DC2Type:datetime_immutable)
  135.         , content CLOB NOT NULL)');
  136.         $this->addSql('INSERT INTO message (id, place_origin_id, playable_entity_origin_id, date_time, content) SELECT id, place_origin_id, playable_entity_origin_id, date_time, content FROM __temp__message');
  137.         $this->addSql('DROP TABLE __temp__message');
  138.         $this->addSql('CREATE INDEX IDX_B6BD307F2239FAB1 ON message (place_origin_id)');
  139.         $this->addSql('CREATE INDEX IDX_B6BD307FD1741030 ON message (playable_entity_origin_id)');
  140.         $this->addSql('DROP INDEX IDX_B548B0F56A273CC');
  141.         $this->addSql('DROP INDEX IDX_B548B0F816C6140');
  142.         $this->addSql('CREATE TEMPORARY TABLE __temp__path AS SELECT id, origin_id, destination_id, name, position FROM path');
  143.         $this->addSql('DROP TABLE path');
  144.         $this->addSql('CREATE TABLE path (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, origin_id INTEGER NOT NULL, destination_id INTEGER NOT NULL, name VARCHAR(255) NOT NULL, position SMALLINT NOT NULL)');
  145.         $this->addSql('INSERT INTO path (id, origin_id, destination_id, name, position) SELECT id, origin_id, destination_id, name, position FROM __temp__path');
  146.         $this->addSql('DROP TABLE __temp__path');
  147.         $this->addSql('CREATE INDEX IDX_B548B0F56A273CC ON path (origin_id)');
  148.         $this->addSql('CREATE INDEX IDX_B548B0F816C6140 ON path (destination_id)');
  149.         $this->addSql('DROP INDEX IDX_63110882DA6A219');
  150.         $this->addSql('CREATE TEMPORARY TABLE __temp__place_description AS SELECT id, place_id, text, language, datetime FROM place_description');
  151.         $this->addSql('DROP TABLE place_description');
  152.         $this->addSql('CREATE TABLE place_description (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, place_id INTEGER NOT NULL, text CLOB NOT NULL, language VARCHAR(10) NOT NULL, datetime DATETIME NOT NULL --(DC2Type:datetime_immutable)
  153.         )');
  154.         $this->addSql('INSERT INTO place_description (id, place_id, text, language, datetime) SELECT id, place_id, text, language, datetime FROM __temp__place_description');
  155.         $this->addSql('DROP TABLE __temp__place_description');
  156.         $this->addSql('CREATE INDEX IDX_63110882DA6A219 ON place_description (place_id)');
  157.         $this->addSql('DROP INDEX IDX_114242BE99E6F5DF');
  158.         $this->addSql('DROP INDEX IDX_114242BEDA6A219');
  159.         $this->addSql('CREATE TEMPORARY TABLE __temp__playable_entity AS SELECT id, player_id, place_id, name, gender, trombinoscope, size, hp, ap, max_hp, max_ap, armor_class, agility, charisma, intelligence, perception, strength, skills, abilities, known_magicskills, known_attackskills, known_craftskills, race FROM playable_entity');
  160.         $this->addSql('DROP TABLE playable_entity');
  161.         $this->addSql('CREATE TABLE playable_entity (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, player_id INTEGER DEFAULT NULL, place_id INTEGER DEFAULT NULL, name VARCHAR(255) NOT NULL, gender SMALLINT NOT NULL, trombinoscope CLOB DEFAULT NULL --(DC2Type:array)
  162.         , size SMALLINT NOT NULL, hp INTEGER NOT NULL, ap INTEGER NOT NULL, max_hp INTEGER NOT NULL, max_ap INTEGER NOT NULL, armor_class INTEGER NOT NULL, agility INTEGER NOT NULL, charisma INTEGER NOT NULL, intelligence INTEGER NOT NULL, perception INTEGER NOT NULL, strength INTEGER NOT NULL, skills CLOB DEFAULT NULL --(DC2Type:array)
  163.         , abilities CLOB DEFAULT NULL --(DC2Type:array)
  164.         , known_magicskills CLOB DEFAULT NULL --(DC2Type:array)
  165.         , known_attackskills CLOB DEFAULT NULL --(DC2Type:array)
  166.         , known_craftskills CLOB DEFAULT NULL --(DC2Type:array)
  167.         , race VARCHAR(255) NOT NULL)');
  168.         $this->addSql('INSERT INTO playable_entity (id, player_id, place_id, name, gender, trombinoscope, size, hp, ap, max_hp, max_ap, armor_class, agility, charisma, intelligence, perception, strength, skills, abilities, known_magicskills, known_attackskills, known_craftskills, race) SELECT id, player_id, place_id, name, gender, trombinoscope, size, hp, ap, max_hp, max_ap, armor_class, agility, charisma, intelligence, perception, strength, skills, abilities, known_magicskills, known_attackskills, known_craftskills, race FROM __temp__playable_entity');
  169.         $this->addSql('DROP TABLE __temp__playable_entity');
  170.         $this->addSql('CREATE INDEX IDX_114242BE99E6F5DF ON playable_entity (player_id)');
  171.         $this->addSql('CREATE INDEX IDX_114242BEDA6A219 ON playable_entity (place_id)');
  172.         $this->addSql('DROP INDEX IDX_15659A3F31C1B00');
  173.         $this->addSql('CREATE TEMPORARY TABLE __temp__playable_entity_description AS SELECT id, playable_entity_id, text, language, datetime FROM playable_entity_description');
  174.         $this->addSql('DROP TABLE playable_entity_description');
  175.         $this->addSql('CREATE TABLE playable_entity_description (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, playable_entity_id INTEGER DEFAULT NULL, text CLOB NOT NULL, language VARCHAR(10) NOT NULL, datetime DATETIME NOT NULL --(DC2Type:datetime_immutable)
  176.         )');
  177.         $this->addSql('INSERT INTO playable_entity_description (id, playable_entity_id, text, language, datetime) SELECT id, playable_entity_id, text, language, datetime FROM __temp__playable_entity_description');
  178.         $this->addSql('DROP TABLE __temp__playable_entity_description');
  179.         $this->addSql('CREATE INDEX IDX_15659A3F31C1B00 ON playable_entity_description (playable_entity_id)');
  180.         $this->addSql('DROP INDEX IDX_86A7E937DA6A219');
  181.         $this->addSql('CREATE TEMPORARY TABLE __temp__unplayable_entity AS SELECT id, place_id, name, hp, hp_max, ap, ap_max, armor_class, description FROM unplayable_entity');
  182.         $this->addSql('DROP TABLE unplayable_entity');
  183.         $this->addSql('CREATE TABLE unplayable_entity (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, place_id INTEGER DEFAULT NULL, name VARCHAR(255) NOT NULL, hp INTEGER NOT NULL, hp_max INTEGER NOT NULL, ap INTEGER NOT NULL, ap_max INTEGER NOT NULL, armor_class INTEGER NOT NULL, description CLOB DEFAULT NULL --(DC2Type:array)
  184.         )');
  185.         $this->addSql('INSERT INTO unplayable_entity (id, place_id, name, hp, hp_max, ap, ap_max, armor_class, description) SELECT id, place_id, name, hp, hp_max, ap, ap_max, armor_class, description FROM __temp__unplayable_entity');
  186.         $this->addSql('DROP TABLE __temp__unplayable_entity');
  187.         $this->addSql('CREATE INDEX IDX_86A7E937DA6A219 ON unplayable_entity (place_id)');
  188.         $this->addSql('DROP INDEX UNIQ_8D93D649E7927C74');
  189.         $this->addSql('DROP INDEX UNIQ_8D93D6491136BE75');
  190.         $this->addSql('CREATE TEMPORARY TABLE __temp__user AS SELECT id, character_id, nickname, email, roles, password FROM user');
  191.         $this->addSql('DROP TABLE user');
  192.         $this->addSql('CREATE TABLE user (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, character_id INTEGER DEFAULT NULL, nickname VARCHAR(255) NOT NULL, email VARCHAR(180) NOT NULL, roles CLOB NOT NULL --(DC2Type:json)
  193.         , password VARCHAR(255) NOT NULL)');
  194.         $this->addSql('INSERT INTO user (id, character_id, nickname, email, roles, password) SELECT id, character_id, nickname, email, roles, password FROM __temp__user');
  195.         $this->addSql('DROP TABLE __temp__user');
  196.         $this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D649E7927C74 ON user (email)');
  197.         $this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D6491136BE75 ON user (character_id)');
  198.     }
  199. }