<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20220928182009 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TEMPORARY TABLE __temp__album AS SELECT id FROM album');
$this->addSql('DROP TABLE album');
$this->addSql('CREATE TABLE album (id INTEGER NOT NULL, PRIMARY KEY(id), CONSTRAINT FK_39986E43BF396750 FOREIGN KEY (id) REFERENCES contents (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)');
$this->addSql('INSERT INTO album (id) SELECT id FROM __temp__album');
$this->addSql('DROP TABLE __temp__album');
$this->addSql('CREATE TEMPORARY TABLE __temp__article AS SELECT id FROM article');
$this->addSql('DROP TABLE article');
$this->addSql('CREATE TABLE article (id INTEGER NOT NULL, PRIMARY KEY(id), CONSTRAINT FK_23A0E66BF396750 FOREIGN KEY (id) REFERENCES contents (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)');
$this->addSql('INSERT INTO article (id) SELECT id FROM __temp__article');
$this->addSql('DROP TABLE __temp__article');
$this->addSql('CREATE TEMPORARY TABLE __temp__audio AS SELECT id, audio_file, audio_author FROM audio');
$this->addSql('DROP TABLE audio');
$this->addSql('CREATE TABLE audio (id INTEGER NOT NULL, audio_file VARCHAR(255) DEFAULT NULL, audio_author VARCHAR(255) NOT NULL, PRIMARY KEY(id), CONSTRAINT FK_187D3695BF396750 FOREIGN KEY (id) REFERENCES contents (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)');
$this->addSql('INSERT INTO audio (id, audio_file, audio_author) SELECT id, audio_file, audio_author FROM __temp__audio');
$this->addSql('DROP TABLE __temp__audio');
$this->addSql('DROP INDEX IDX_B4FA1177E2C35FC');
$this->addSql('DROP INDEX IDX_B4FA1177A76ED395');
$this->addSql('DROP INDEX UNIQ_B4FA1177989D9B62');
$this->addSql('DROP INDEX UNIQ_B4FA1177E3C68343');
$this->addSql('CREATE TEMPORARY TABLE __temp__contents AS SELECT id, term_id, user_id, unique_id, title, slug, summary, body, thumbnail, status, is_featured, promoted, publish_on_socialmedia, is_published_social_media, is_home, date_created, date_published, meta_keywords, meta_description, content_type, updated_at FROM contents');
$this->addSql('DROP TABLE contents');
$this->addSql('CREATE TABLE contents (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, term_id INTEGER DEFAULT NULL, user_id INTEGER NOT NULL, unique_id VARCHAR(255) DEFAULT NULL, title VARCHAR(255) NOT NULL, slug VARCHAR(255) NOT NULL, summary CLOB DEFAULT NULL, body CLOB DEFAULT NULL, thumbnail VARCHAR(255) DEFAULT NULL, status VARCHAR(20) NOT NULL, is_featured BOOLEAN DEFAULT NULL, promoted BOOLEAN DEFAULT NULL, publish_on_socialmedia BOOLEAN DEFAULT NULL, is_published_social_media BOOLEAN DEFAULT NULL, is_home BOOLEAN DEFAULT NULL, date_created DATETIME NOT NULL, date_published DATETIME DEFAULT NULL, meta_keywords VARCHAR(255) DEFAULT NULL, meta_description VARCHAR(255) DEFAULT NULL, content_type VARCHAR(255) NOT NULL, updated_at DATETIME DEFAULT NULL --(DC2Type:datetime_immutable)
, CONSTRAINT FK_B4FA1177A76ED395 FOREIGN KEY (user_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_B4FA1177E2C35FC FOREIGN KEY (term_id) REFERENCES taxonomy_term (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
$this->addSql('INSERT INTO contents (id, term_id, user_id, unique_id, title, slug, summary, body, thumbnail, status, is_featured, promoted, publish_on_socialmedia, is_published_social_media, is_home, date_created, date_published, meta_keywords, meta_description, content_type, updated_at) SELECT id, term_id, user_id, unique_id, title, slug, summary, body, thumbnail, status, is_featured, promoted, publish_on_socialmedia, is_published_social_media, is_home, date_created, date_published, meta_keywords, meta_description, content_type, updated_at FROM __temp__contents');
$this->addSql('DROP TABLE __temp__contents');
$this->addSql('CREATE INDEX IDX_B4FA1177E2C35FC ON contents (term_id)');
$this->addSql('CREATE INDEX IDX_B4FA1177A76ED395 ON contents (user_id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_B4FA1177989D9B62 ON contents (slug)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_B4FA1177E3C68343 ON contents (unique_id)');
$this->addSql('CREATE TEMPORARY TABLE __temp__document AS SELECT id, extension, file_name FROM document');
$this->addSql('DROP TABLE document');
$this->addSql('CREATE TABLE document (id INTEGER NOT NULL, extension VARCHAR(20) DEFAULT NULL, file_name VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id), CONSTRAINT FK_D8698A76BF396750 FOREIGN KEY (id) REFERENCES contents (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)');
$this->addSql('INSERT INTO document (id, extension, file_name) SELECT id, extension, file_name FROM __temp__document');
$this->addSql('DROP TABLE __temp__document');
$this->addSql('CREATE TEMPORARY TABLE __temp__events AS SELECT id, event_venue, event_date, is_register_require, end_date, price, event_time, country FROM events');
$this->addSql('DROP TABLE events');
$this->addSql('CREATE TABLE events (id INTEGER NOT NULL, event_venue VARCHAR(255) NOT NULL, event_date DATETIME DEFAULT NULL, is_register_require BOOLEAN DEFAULT NULL, end_date DATETIME DEFAULT NULL, price NUMERIC(10, 2) DEFAULT NULL, event_time VARCHAR(255) DEFAULT NULL, country VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id), CONSTRAINT FK_5387574ABF396750 FOREIGN KEY (id) REFERENCES contents (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)');
$this->addSql('INSERT INTO events (id, event_venue, event_date, is_register_require, end_date, price, event_time, country) SELECT id, event_venue, event_date, is_register_require, end_date, price, event_time, country FROM __temp__events');
$this->addSql('DROP TABLE __temp__events');
$this->addSql('DROP INDEX UNIQ_140AB62034ECB4E6');
$this->addSql('CREATE TEMPORARY TABLE __temp__page AS SELECT id, route_id, parent_id FROM page');
$this->addSql('DROP TABLE page');
$this->addSql('CREATE TABLE page (id INTEGER NOT NULL, route_id INTEGER DEFAULT NULL, parent_id VARCHAR(40) DEFAULT NULL, PRIMARY KEY(id), CONSTRAINT FK_140AB62034ECB4E6 FOREIGN KEY (route_id) REFERENCES route (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_140AB620BF396750 FOREIGN KEY (id) REFERENCES contents (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)');
$this->addSql('INSERT INTO page (id, route_id, parent_id) SELECT id, route_id, parent_id FROM __temp__page');
$this->addSql('DROP TABLE __temp__page');
$this->addSql('CREATE UNIQUE INDEX UNIQ_140AB62034ECB4E6 ON page (route_id)');
$this->addSql('DROP INDEX IDX_14B7841884A0A3ED');
$this->addSql('CREATE TEMPORARY TABLE __temp__photo AS SELECT id, content_id, title, created_at, thumbnail FROM photo');
$this->addSql('DROP TABLE photo');
$this->addSql('CREATE TABLE photo (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, content_id INTEGER DEFAULT NULL, title VARCHAR(255) NOT NULL, created_at DATETIME NOT NULL, thumbnail VARCHAR(100) DEFAULT NULL, mime_type VARCHAR(100) DEFAULT NULL, CONSTRAINT FK_14B7841884A0A3ED FOREIGN KEY (content_id) REFERENCES contents (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
$this->addSql('INSERT INTO photo (id, content_id, title, created_at, thumbnail) SELECT id, content_id, title, created_at, thumbnail FROM __temp__photo');
$this->addSql('DROP TABLE __temp__photo');
$this->addSql('CREATE INDEX IDX_14B7841884A0A3ED ON photo (content_id)');
$this->addSql('DROP INDEX IDX_3DDCB9FF15ED8D43');
$this->addSql('CREATE TEMPORARY TABLE __temp__programme AS SELECT id, tour_id, title, description, created_at FROM programme');
$this->addSql('DROP TABLE programme');
$this->addSql('CREATE TABLE programme (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, tour_id INTEGER NOT NULL, title VARCHAR(255) NOT NULL, description CLOB NOT NULL, created_at DATETIME NOT NULL --(DC2Type:datetime_immutable)
, CONSTRAINT FK_3DDCB9FF15ED8D43 FOREIGN KEY (tour_id) REFERENCES tour (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
$this->addSql('INSERT INTO programme (id, tour_id, title, description, created_at) SELECT id, tour_id, title, description, created_at FROM __temp__programme');
$this->addSql('DROP TABLE __temp__programme');
$this->addSql('CREATE INDEX IDX_3DDCB9FF15ED8D43 ON programme (tour_id)');
$this->addSql('CREATE TEMPORARY TABLE __temp__project AS SELECT id FROM project');
$this->addSql('DROP TABLE project');
$this->addSql('CREATE TABLE project (id INTEGER NOT NULL, PRIMARY KEY(id), CONSTRAINT FK_2FB3D0EEBF396750 FOREIGN KEY (id) REFERENCES contents (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)');
$this->addSql('INSERT INTO project (id) SELECT id FROM __temp__project');
$this->addSql('DROP TABLE __temp__project');
$this->addSql('DROP INDEX IDX_7CE748AA76ED395');
$this->addSql('CREATE TEMPORARY TABLE __temp__reset_password_request AS SELECT id, user_id, selector, hashed_token, requested_at, expires_at FROM reset_password_request');
$this->addSql('DROP TABLE reset_password_request');
$this->addSql('CREATE TABLE reset_password_request (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER NOT NULL, selector VARCHAR(20) NOT NULL, hashed_token VARCHAR(100) NOT NULL, requested_at DATETIME NOT NULL --(DC2Type:datetime_immutable)
, expires_at DATETIME NOT NULL --(DC2Type:datetime_immutable)
, CONSTRAINT FK_7CE748AA76ED395 FOREIGN KEY (user_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
$this->addSql('INSERT INTO reset_password_request (id, user_id, selector, hashed_token, requested_at, expires_at) SELECT id, user_id, selector, hashed_token, requested_at, expires_at FROM __temp__reset_password_request');
$this->addSql('DROP TABLE __temp__reset_password_request');
$this->addSql('CREATE INDEX IDX_7CE748AA76ED395 ON reset_password_request (user_id)');
$this->addSql('DROP INDEX UNIQ_C7ED653A34ECB4E6');
$this->addSql('DROP INDEX IDX_C7ED653A5550C4ED');
$this->addSql('DROP INDEX IDX_C7ED653A51DDB85F');
$this->addSql('DROP INDEX UNIQ_C7ED653AC35726E6');
$this->addSql('CREATE TEMPORARY TABLE __temp__taxonomy_term AS SELECT id, vid, pid, route_id, name, slug, description, weight, lvl, createdAt, updatedAt, is_enable, thumbnail, path FROM taxonomy_term');
$this->addSql('DROP TABLE taxonomy_term');
$this->addSql('CREATE TABLE taxonomy_term (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, vid INTEGER DEFAULT NULL, pid INTEGER DEFAULT NULL, route_id INTEGER DEFAULT NULL, name VARCHAR(255) NOT NULL, slug VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, weight INTEGER NOT NULL, lvl INTEGER NOT NULL, createdAt DATETIME NOT NULL, updatedAt DATETIME DEFAULT NULL, is_enable BOOLEAN NOT NULL, thumbnail VARCHAR(100) DEFAULT NULL, path CLOB DEFAULT NULL, CONSTRAINT FK_C7ED653A51DDB85F FOREIGN KEY (vid) REFERENCES taxonomy_vocabulary (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_C7ED653A5550C4ED FOREIGN KEY (pid) REFERENCES taxonomy_term (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_C7ED653A34ECB4E6 FOREIGN KEY (route_id) REFERENCES route (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
$this->addSql('INSERT INTO taxonomy_term (id, vid, pid, route_id, name, slug, description, weight, lvl, createdAt, updatedAt, is_enable, thumbnail, path) SELECT id, vid, pid, route_id, name, slug, description, weight, lvl, createdAt, updatedAt, is_enable, thumbnail, path FROM __temp__taxonomy_term');
$this->addSql('DROP TABLE __temp__taxonomy_term');
$this->addSql('CREATE UNIQUE INDEX UNIQ_C7ED653A34ECB4E6 ON taxonomy_term (route_id)');
$this->addSql('CREATE INDEX IDX_C7ED653A5550C4ED ON taxonomy_term (pid)');
$this->addSql('CREATE INDEX IDX_C7ED653A51DDB85F ON taxonomy_term (vid)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_C7ED653AC35726E6 ON taxonomy_term (thumbnail)');
$this->addSql('CREATE TEMPORARY TABLE __temp__tour AS SELECT id, location, price, duration FROM tour');
$this->addSql('DROP TABLE tour');
$this->addSql('CREATE TABLE tour (id INTEGER NOT NULL, location VARCHAR(255) DEFAULT NULL, price NUMERIC(10, 0) DEFAULT NULL, duration VARCHAR(255) NOT NULL, PRIMARY KEY(id), CONSTRAINT FK_6AD1F969BF396750 FOREIGN KEY (id) REFERENCES contents (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)');
$this->addSql('INSERT INTO tour (id, location, price, duration) SELECT id, location, price, duration FROM __temp__tour');
$this->addSql('DROP TABLE __temp__tour');
$this->addSql('CREATE TEMPORARY TABLE __temp__user_admin AS SELECT id FROM user_admin');
$this->addSql('DROP TABLE user_admin');
$this->addSql('CREATE TABLE user_admin (id INTEGER NOT NULL, PRIMARY KEY(id), CONSTRAINT FK_6ACCF62EBF396750 FOREIGN KEY (id) REFERENCES users (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)');
$this->addSql('INSERT INTO user_admin (id) SELECT id FROM __temp__user_admin');
$this->addSql('DROP TABLE __temp__user_admin');
$this->addSql('CREATE TEMPORARY TABLE __temp__video AS SELECT id, youtube_video_id FROM video');
$this->addSql('DROP TABLE video');
$this->addSql('CREATE TABLE video (id INTEGER NOT NULL, youtube_video_id VARCHAR(255) NOT NULL, PRIMARY KEY(id), CONSTRAINT FK_7CC7DA2CBF396750 FOREIGN KEY (id) REFERENCES contents (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)');
$this->addSql('INSERT INTO video (id, youtube_video_id) SELECT id, youtube_video_id FROM __temp__video');
$this->addSql('DROP TABLE __temp__video');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TEMPORARY TABLE __temp__album AS SELECT id FROM album');
$this->addSql('DROP TABLE album');
$this->addSql('CREATE TABLE album (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)');
$this->addSql('INSERT INTO album (id) SELECT id FROM __temp__album');
$this->addSql('DROP TABLE __temp__album');
$this->addSql('CREATE TEMPORARY TABLE __temp__article AS SELECT id FROM article');
$this->addSql('DROP TABLE article');
$this->addSql('CREATE TABLE article (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)');
$this->addSql('INSERT INTO article (id) SELECT id FROM __temp__article');
$this->addSql('DROP TABLE __temp__article');
$this->addSql('CREATE TEMPORARY TABLE __temp__audio AS SELECT id, audio_file, audio_author FROM audio');
$this->addSql('DROP TABLE audio');
$this->addSql('CREATE TABLE audio (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, audio_file VARCHAR(255) DEFAULT NULL, audio_author VARCHAR(255) NOT NULL)');
$this->addSql('INSERT INTO audio (id, audio_file, audio_author) SELECT id, audio_file, audio_author FROM __temp__audio');
$this->addSql('DROP TABLE __temp__audio');
$this->addSql('DROP INDEX UNIQ_B4FA1177E3C68343');
$this->addSql('DROP INDEX UNIQ_B4FA1177989D9B62');
$this->addSql('DROP INDEX IDX_B4FA1177A76ED395');
$this->addSql('DROP INDEX IDX_B4FA1177E2C35FC');
$this->addSql('CREATE TEMPORARY TABLE __temp__contents AS SELECT id, user_id, term_id, unique_id, title, slug, summary, body, thumbnail, status, is_featured, promoted, publish_on_socialmedia, is_published_social_media, is_home, date_created, date_published, meta_keywords, meta_description, updated_at, content_type FROM contents');
$this->addSql('DROP TABLE contents');
$this->addSql('CREATE TABLE contents (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER NOT NULL, term_id INTEGER DEFAULT NULL, unique_id VARCHAR(255) DEFAULT NULL, title VARCHAR(255) NOT NULL, slug VARCHAR(255) NOT NULL, summary CLOB DEFAULT NULL, body CLOB DEFAULT NULL, thumbnail VARCHAR(255) DEFAULT NULL, status VARCHAR(20) NOT NULL, is_featured BOOLEAN DEFAULT NULL, promoted BOOLEAN DEFAULT NULL, publish_on_socialmedia BOOLEAN DEFAULT NULL, is_published_social_media BOOLEAN DEFAULT NULL, is_home BOOLEAN DEFAULT NULL, date_created DATETIME NOT NULL, date_published DATETIME DEFAULT NULL, meta_keywords VARCHAR(255) DEFAULT NULL, meta_description VARCHAR(255) DEFAULT NULL, updated_at DATETIME DEFAULT NULL --(DC2Type:datetime_immutable)
, content_type VARCHAR(255) NOT NULL)');
$this->addSql('INSERT INTO contents (id, user_id, term_id, unique_id, title, slug, summary, body, thumbnail, status, is_featured, promoted, publish_on_socialmedia, is_published_social_media, is_home, date_created, date_published, meta_keywords, meta_description, updated_at, content_type) SELECT id, user_id, term_id, unique_id, title, slug, summary, body, thumbnail, status, is_featured, promoted, publish_on_socialmedia, is_published_social_media, is_home, date_created, date_published, meta_keywords, meta_description, updated_at, content_type FROM __temp__contents');
$this->addSql('DROP TABLE __temp__contents');
$this->addSql('CREATE UNIQUE INDEX UNIQ_B4FA1177E3C68343 ON contents (unique_id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_B4FA1177989D9B62 ON contents (slug)');
$this->addSql('CREATE INDEX IDX_B4FA1177A76ED395 ON contents (user_id)');
$this->addSql('CREATE INDEX IDX_B4FA1177E2C35FC ON contents (term_id)');
$this->addSql('CREATE TEMPORARY TABLE __temp__document AS SELECT id, file_name, extension FROM document');
$this->addSql('DROP TABLE document');
$this->addSql('CREATE TABLE document (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, file_name VARCHAR(255) DEFAULT NULL, extension VARCHAR(20) DEFAULT NULL)');
$this->addSql('INSERT INTO document (id, file_name, extension) SELECT id, file_name, extension FROM __temp__document');
$this->addSql('DROP TABLE __temp__document');
$this->addSql('CREATE TEMPORARY TABLE __temp__events AS SELECT id, event_date, end_date, event_time, event_venue, country, is_register_require, price FROM events');
$this->addSql('DROP TABLE events');
$this->addSql('CREATE TABLE events (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, event_date DATETIME DEFAULT NULL, end_date DATETIME DEFAULT NULL, event_time VARCHAR(255) DEFAULT NULL, event_venue VARCHAR(255) NOT NULL, country VARCHAR(255) DEFAULT NULL, is_register_require BOOLEAN DEFAULT NULL, price NUMERIC(10, 2) DEFAULT NULL)');
$this->addSql('INSERT INTO events (id, event_date, end_date, event_time, event_venue, country, is_register_require, price) SELECT id, event_date, end_date, event_time, event_venue, country, is_register_require, price FROM __temp__events');
$this->addSql('DROP TABLE __temp__events');
$this->addSql('DROP INDEX UNIQ_140AB62034ECB4E6');
$this->addSql('CREATE TEMPORARY TABLE __temp__page AS SELECT id, route_id, parent_id FROM page');
$this->addSql('DROP TABLE page');
$this->addSql('CREATE TABLE page (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, route_id INTEGER DEFAULT NULL, parent_id VARCHAR(40) DEFAULT NULL)');
$this->addSql('INSERT INTO page (id, route_id, parent_id) SELECT id, route_id, parent_id FROM __temp__page');
$this->addSql('DROP TABLE __temp__page');
$this->addSql('CREATE UNIQUE INDEX UNIQ_140AB62034ECB4E6 ON page (route_id)');
$this->addSql('DROP INDEX IDX_14B7841884A0A3ED');
$this->addSql('CREATE TEMPORARY TABLE __temp__photo AS SELECT id, content_id, title, created_at, thumbnail FROM photo');
$this->addSql('DROP TABLE photo');
$this->addSql('CREATE TABLE photo (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, content_id INTEGER DEFAULT NULL, title VARCHAR(255) NOT NULL, created_at DATETIME NOT NULL, thumbnail VARCHAR(100) DEFAULT NULL)');
$this->addSql('INSERT INTO photo (id, content_id, title, created_at, thumbnail) SELECT id, content_id, title, created_at, thumbnail FROM __temp__photo');
$this->addSql('DROP TABLE __temp__photo');
$this->addSql('CREATE INDEX IDX_14B7841884A0A3ED ON photo (content_id)');
$this->addSql('DROP INDEX IDX_3DDCB9FF15ED8D43');
$this->addSql('CREATE TEMPORARY TABLE __temp__programme AS SELECT id, tour_id, title, description, created_at FROM programme');
$this->addSql('DROP TABLE programme');
$this->addSql('CREATE TABLE programme (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, tour_id INTEGER NOT NULL, title VARCHAR(255) NOT NULL, description CLOB NOT NULL, created_at DATETIME NOT NULL --(DC2Type:datetime_immutable)
)');
$this->addSql('INSERT INTO programme (id, tour_id, title, description, created_at) SELECT id, tour_id, title, description, created_at FROM __temp__programme');
$this->addSql('DROP TABLE __temp__programme');
$this->addSql('CREATE INDEX IDX_3DDCB9FF15ED8D43 ON programme (tour_id)');
$this->addSql('CREATE TEMPORARY TABLE __temp__project AS SELECT id FROM project');
$this->addSql('DROP TABLE project');
$this->addSql('CREATE TABLE project (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)');
$this->addSql('INSERT INTO project (id) SELECT id FROM __temp__project');
$this->addSql('DROP TABLE __temp__project');
$this->addSql('DROP INDEX IDX_7CE748AA76ED395');
$this->addSql('CREATE TEMPORARY TABLE __temp__reset_password_request AS SELECT id, user_id, selector, hashed_token, requested_at, expires_at FROM reset_password_request');
$this->addSql('DROP TABLE reset_password_request');
$this->addSql('CREATE TABLE reset_password_request (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER NOT NULL, selector VARCHAR(20) NOT NULL, hashed_token VARCHAR(100) NOT NULL, requested_at DATETIME NOT NULL --(DC2Type:datetime_immutable)
, expires_at DATETIME NOT NULL --(DC2Type:datetime_immutable)
)');
$this->addSql('INSERT INTO reset_password_request (id, user_id, selector, hashed_token, requested_at, expires_at) SELECT id, user_id, selector, hashed_token, requested_at, expires_at FROM __temp__reset_password_request');
$this->addSql('DROP TABLE __temp__reset_password_request');
$this->addSql('CREATE INDEX IDX_7CE748AA76ED395 ON reset_password_request (user_id)');
$this->addSql('DROP INDEX UNIQ_C7ED653AC35726E6');
$this->addSql('DROP INDEX IDX_C7ED653A51DDB85F');
$this->addSql('DROP INDEX IDX_C7ED653A5550C4ED');
$this->addSql('DROP INDEX UNIQ_C7ED653A34ECB4E6');
$this->addSql('CREATE TEMPORARY TABLE __temp__taxonomy_term AS SELECT id, vid, pid, route_id, name, slug, description, weight, path, lvl, createdAt, updatedAt, is_enable, thumbnail FROM taxonomy_term');
$this->addSql('DROP TABLE taxonomy_term');
$this->addSql('CREATE TABLE taxonomy_term (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, vid INTEGER DEFAULT NULL, pid INTEGER DEFAULT NULL, route_id INTEGER DEFAULT NULL, name VARCHAR(255) NOT NULL, slug VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, weight INTEGER NOT NULL, path CLOB DEFAULT NULL, lvl INTEGER NOT NULL, createdAt DATETIME NOT NULL, updatedAt DATETIME DEFAULT NULL, is_enable BOOLEAN NOT NULL, thumbnail VARCHAR(100) DEFAULT NULL)');
$this->addSql('INSERT INTO taxonomy_term (id, vid, pid, route_id, name, slug, description, weight, path, lvl, createdAt, updatedAt, is_enable, thumbnail) SELECT id, vid, pid, route_id, name, slug, description, weight, path, lvl, createdAt, updatedAt, is_enable, thumbnail FROM __temp__taxonomy_term');
$this->addSql('DROP TABLE __temp__taxonomy_term');
$this->addSql('CREATE UNIQUE INDEX UNIQ_C7ED653AC35726E6 ON taxonomy_term (thumbnail)');
$this->addSql('CREATE INDEX IDX_C7ED653A51DDB85F ON taxonomy_term (vid)');
$this->addSql('CREATE INDEX IDX_C7ED653A5550C4ED ON taxonomy_term (pid)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_C7ED653A34ECB4E6 ON taxonomy_term (route_id)');
$this->addSql('CREATE TEMPORARY TABLE __temp__tour AS SELECT id, location, price, duration FROM tour');
$this->addSql('DROP TABLE tour');
$this->addSql('CREATE TABLE tour (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, location VARCHAR(255) DEFAULT NULL, price NUMERIC(10, 0) DEFAULT NULL, duration VARCHAR(255) NOT NULL)');
$this->addSql('INSERT INTO tour (id, location, price, duration) SELECT id, location, price, duration FROM __temp__tour');
$this->addSql('DROP TABLE __temp__tour');
$this->addSql('CREATE TEMPORARY TABLE __temp__user_admin AS SELECT id FROM user_admin');
$this->addSql('DROP TABLE user_admin');
$this->addSql('CREATE TABLE user_admin (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)');
$this->addSql('INSERT INTO user_admin (id) SELECT id FROM __temp__user_admin');
$this->addSql('DROP TABLE __temp__user_admin');
$this->addSql('CREATE TEMPORARY TABLE __temp__video AS SELECT id, youtube_video_id FROM video');
$this->addSql('DROP TABLE video');
$this->addSql('CREATE TABLE video (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, youtube_video_id VARCHAR(255) NOT NULL)');
$this->addSql('INSERT INTO video (id, youtube_video_id) SELECT id, youtube_video_id FROM __temp__video');
$this->addSql('DROP TABLE __temp__video');
}
}