diff --git a/httpdocs/migrations/Version20241001153007.php b/httpdocs/migrations/Version20241001153007.php deleted file mode 100644 index 446b783..0000000 --- a/httpdocs/migrations/Version20241001153007.php +++ /dev/null @@ -1,37 +0,0 @@ -addSql('CREATE TABLE media_object (id INT AUTO_INCREMENT NOT NULL, created_by_id INT NOT NULL, file_path VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_14D43132B03A8386 (created_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE `user` (id INT AUTO_INCREMENT NOT NULL, image_id INT DEFAULT NULL, email VARCHAR(180) NOT NULL, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, roles JSON NOT NULL COMMENT \'(DC2Type:json)\', password VARCHAR(255) NOT NULL, active TINYINT(1) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', UNIQUE INDEX UNIQ_8D93D649E7927C74 (email), INDEX IDX_8D93D6493DA5256D (image_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('ALTER TABLE media_object ADD CONSTRAINT FK_14D43132B03A8386 FOREIGN KEY (created_by_id) REFERENCES `user` (id) ON DELETE CASCADE'); - $this->addSql('ALTER TABLE `user` ADD CONSTRAINT FK_8D93D6493DA5256D FOREIGN KEY (image_id) REFERENCES media_object (id) ON DELETE SET NULL'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE media_object DROP FOREIGN KEY FK_14D43132B03A8386'); - $this->addSql('ALTER TABLE `user` DROP FOREIGN KEY FK_8D93D6493DA5256D'); - $this->addSql('DROP TABLE media_object'); - $this->addSql('DROP TABLE `user`'); - } -} diff --git a/httpdocs/migrations/Version20241114121031.php b/httpdocs/migrations/Version20241114121031.php deleted file mode 100644 index 5b75e81..0000000 --- a/httpdocs/migrations/Version20241114121031.php +++ /dev/null @@ -1,75 +0,0 @@ -addSql('CREATE TABLE location (id INT AUTO_INCREMENT NOT NULL, zone_id INT NOT NULL, name VARCHAR(255) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_5E9E89CB9F2C3FAB (zone_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE shipping_company (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE trip (id INT AUTO_INCREMENT NOT NULL, vessel_id INT NOT NULL, start_location_id INT NOT NULL, end_location_id INT NOT NULL, pilot_reference VARCHAR(255) NOT NULL, captain_name VARCHAR(255) DEFAULT NULL, start_date DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', end_date DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_7656F53B14AF1953 (vessel_id), INDEX IDX_7656F53B5C3A313A (start_location_id), INDEX IDX_7656F53BC43C7F1 (end_location_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE trip_location (id INT AUTO_INCREMENT NOT NULL, trip_id INT NOT NULL, location_id INT NOT NULL, date DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_F6CFBADBA5BC2E0E (trip_id), INDEX IDX_F6CFBADB64D218E (location_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE user_trip (id INT AUTO_INCREMENT NOT NULL, trip_id INT NOT NULL, user_id INT NOT NULL, captain_name VARCHAR(255) NOT NULL, start_date DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', end_date DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_CD7B9F2A5BC2E0E (trip_id), INDEX IDX_CD7B9F2A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE user_trip_location (id INT AUTO_INCREMENT NOT NULL, user_trip_id INT NOT NULL, location_id INT NOT NULL, planned_date DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_1841178BFDB13004 (user_trip_id), INDEX IDX_1841178B64D218E (location_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE user_trip_work_log (id INT AUTO_INCREMENT NOT NULL, user_trip_id INT NOT NULL, start_location_id INT NOT NULL, end_location_id INT NOT NULL, start_date DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', end_date DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_B38EA119FDB13004 (user_trip_id), INDEX IDX_B38EA1195C3A313A (start_location_id), INDEX IDX_B38EA119C43C7F1 (end_location_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE vessel (id INT AUTO_INCREMENT NOT NULL, company_id INT NOT NULL, name VARCHAR(255) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_4ED8DCA8979B1AD6 (company_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE zone (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('ALTER TABLE location ADD CONSTRAINT FK_5E9E89CB9F2C3FAB FOREIGN KEY (zone_id) REFERENCES zone (id)'); - $this->addSql('ALTER TABLE trip ADD CONSTRAINT FK_7656F53B14AF1953 FOREIGN KEY (vessel_id) REFERENCES vessel (id)'); - $this->addSql('ALTER TABLE trip ADD CONSTRAINT FK_7656F53B5C3A313A FOREIGN KEY (start_location_id) REFERENCES location (id)'); - $this->addSql('ALTER TABLE trip ADD CONSTRAINT FK_7656F53BC43C7F1 FOREIGN KEY (end_location_id) REFERENCES location (id)'); - $this->addSql('ALTER TABLE trip_location ADD CONSTRAINT FK_F6CFBADBA5BC2E0E FOREIGN KEY (trip_id) REFERENCES trip (id)'); - $this->addSql('ALTER TABLE trip_location ADD CONSTRAINT FK_F6CFBADB64D218E FOREIGN KEY (location_id) REFERENCES location (id)'); - $this->addSql('ALTER TABLE user_trip ADD CONSTRAINT FK_CD7B9F2A5BC2E0E FOREIGN KEY (trip_id) REFERENCES trip (id)'); - $this->addSql('ALTER TABLE user_trip ADD CONSTRAINT FK_CD7B9F2A76ED395 FOREIGN KEY (user_id) REFERENCES `user` (id)'); - $this->addSql('ALTER TABLE user_trip_location ADD CONSTRAINT FK_1841178BFDB13004 FOREIGN KEY (user_trip_id) REFERENCES user_trip (id)'); - $this->addSql('ALTER TABLE user_trip_location ADD CONSTRAINT FK_1841178B64D218E FOREIGN KEY (location_id) REFERENCES location (id)'); - $this->addSql('ALTER TABLE user_trip_work_log ADD CONSTRAINT FK_B38EA119FDB13004 FOREIGN KEY (user_trip_id) REFERENCES user_trip (id)'); - $this->addSql('ALTER TABLE user_trip_work_log ADD CONSTRAINT FK_B38EA1195C3A313A FOREIGN KEY (start_location_id) REFERENCES location (id)'); - $this->addSql('ALTER TABLE user_trip_work_log ADD CONSTRAINT FK_B38EA119C43C7F1 FOREIGN KEY (end_location_id) REFERENCES location (id)'); - $this->addSql('ALTER TABLE vessel ADD CONSTRAINT FK_4ED8DCA8979B1AD6 FOREIGN KEY (company_id) REFERENCES shipping_company (id)'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE location DROP FOREIGN KEY FK_5E9E89CB9F2C3FAB'); - $this->addSql('ALTER TABLE trip DROP FOREIGN KEY FK_7656F53B14AF1953'); - $this->addSql('ALTER TABLE trip DROP FOREIGN KEY FK_7656F53B5C3A313A'); - $this->addSql('ALTER TABLE trip DROP FOREIGN KEY FK_7656F53BC43C7F1'); - $this->addSql('ALTER TABLE trip_location DROP FOREIGN KEY FK_F6CFBADBA5BC2E0E'); - $this->addSql('ALTER TABLE trip_location DROP FOREIGN KEY FK_F6CFBADB64D218E'); - $this->addSql('ALTER TABLE user_trip DROP FOREIGN KEY FK_CD7B9F2A5BC2E0E'); - $this->addSql('ALTER TABLE user_trip DROP FOREIGN KEY FK_CD7B9F2A76ED395'); - $this->addSql('ALTER TABLE user_trip_location DROP FOREIGN KEY FK_1841178BFDB13004'); - $this->addSql('ALTER TABLE user_trip_location DROP FOREIGN KEY FK_1841178B64D218E'); - $this->addSql('ALTER TABLE user_trip_work_log DROP FOREIGN KEY FK_B38EA119FDB13004'); - $this->addSql('ALTER TABLE user_trip_work_log DROP FOREIGN KEY FK_B38EA1195C3A313A'); - $this->addSql('ALTER TABLE user_trip_work_log DROP FOREIGN KEY FK_B38EA119C43C7F1'); - $this->addSql('ALTER TABLE vessel DROP FOREIGN KEY FK_4ED8DCA8979B1AD6'); - $this->addSql('DROP TABLE location'); - $this->addSql('DROP TABLE shipping_company'); - $this->addSql('DROP TABLE trip'); - $this->addSql('DROP TABLE trip_location'); - $this->addSql('DROP TABLE user_trip'); - $this->addSql('DROP TABLE user_trip_location'); - $this->addSql('DROP TABLE user_trip_work_log'); - $this->addSql('DROP TABLE vessel'); - $this->addSql('DROP TABLE zone'); - } -} diff --git a/httpdocs/migrations/Version20241206100317.php b/httpdocs/migrations/Version20241206100317.php deleted file mode 100644 index 06be003..0000000 --- a/httpdocs/migrations/Version20241206100317.php +++ /dev/null @@ -1,31 +0,0 @@ -addSql('ALTER TABLE location ADD code VARCHAR(10) NOT NULL'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE location DROP code'); - } -} diff --git a/httpdocs/migrations/Version20241206103710.php b/httpdocs/migrations/Version20241206103710.php deleted file mode 100644 index d7096a6..0000000 --- a/httpdocs/migrations/Version20241206103710.php +++ /dev/null @@ -1,37 +0,0 @@ -addSql('ALTER TABLE shipping_company ADD code VARCHAR(20) NOT NULL'); - $this->addSql('CREATE UNIQUE INDEX UNIQ_A9F70F8B77153098 ON shipping_company (code)'); - $this->addSql('ALTER TABLE vessel ADD code VARCHAR(20) NOT NULL'); - $this->addSql('CREATE UNIQUE INDEX UNIQ_4ED8DCA877153098 ON vessel (code)'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('DROP INDEX UNIQ_4ED8DCA877153098 ON vessel'); - $this->addSql('ALTER TABLE vessel DROP code'); - $this->addSql('DROP INDEX UNIQ_A9F70F8B77153098 ON shipping_company'); - $this->addSql('ALTER TABLE shipping_company DROP code'); - } -} diff --git a/httpdocs/migrations/Version20241212154759.php b/httpdocs/migrations/Version20241212154759.php deleted file mode 100644 index f9c496c..0000000 --- a/httpdocs/migrations/Version20241212154759.php +++ /dev/null @@ -1,35 +0,0 @@ -addSql('ALTER TABLE location CHANGE code code VARCHAR(255) NOT NULL'); - $this->addSql('ALTER TABLE shipping_company CHANGE code code VARCHAR(255) NOT NULL'); - $this->addSql('ALTER TABLE vessel CHANGE code code VARCHAR(255) NOT NULL'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE vessel CHANGE code code VARCHAR(20) NOT NULL'); - $this->addSql('ALTER TABLE shipping_company CHANGE code code VARCHAR(20) NOT NULL'); - $this->addSql('ALTER TABLE location CHANGE code code VARCHAR(10) NOT NULL'); - } -} diff --git a/httpdocs/migrations/Version20250228112455.php b/httpdocs/migrations/Version20250228112455.php deleted file mode 100644 index b9e97f6..0000000 --- a/httpdocs/migrations/Version20250228112455.php +++ /dev/null @@ -1,31 +0,0 @@ -addSql('ALTER TABLE location ADD is_area TINYINT(1) NOT NULL, ADD is_place TINYINT(1) NOT NULL, ADD is_port TINYINT(1) NOT NULL'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE location DROP is_area, DROP is_place, DROP is_port'); - } -} diff --git a/httpdocs/migrations/Version20250228113640.php b/httpdocs/migrations/Version20250228113640.php deleted file mode 100644 index ed1390c..0000000 --- a/httpdocs/migrations/Version20250228113640.php +++ /dev/null @@ -1,31 +0,0 @@ -addSql('ALTER TABLE location CHANGE is_area is_zone TINYINT(1) NOT NULL'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE location CHANGE is_zone is_area TINYINT(1) NOT NULL'); - } -} diff --git a/httpdocs/migrations/Version20250303144554.php b/httpdocs/migrations/Version20250303144554.php deleted file mode 100644 index f2d67f3..0000000 --- a/httpdocs/migrations/Version20250303144554.php +++ /dev/null @@ -1,53 +0,0 @@ -addSql('CREATE TABLE event (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, identifier VARCHAR(255) NOT NULL, `order` INT UNSIGNED NOT NULL, mandatory TINYINT(1) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', UNIQUE INDEX UNIQ_3BAE0AA75E237E06 (name), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('CREATE TABLE user_trip_event (id INT AUTO_INCREMENT NOT NULL, user_trip_id INT NOT NULL, event_id INT NOT NULL, date DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_46824C08FDB13004 (user_trip_id), INDEX IDX_46824C0871F7E88B (event_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('ALTER TABLE user_trip_event ADD CONSTRAINT FK_46824C08FDB13004 FOREIGN KEY (user_trip_id) REFERENCES user_trip (id)'); - $this->addSql('ALTER TABLE user_trip_event ADD CONSTRAINT FK_46824C0871F7E88B FOREIGN KEY (event_id) REFERENCES event (id)'); - $this->addSql('ALTER TABLE user_trip_location DROP FOREIGN KEY FK_1841178B64D218E'); - $this->addSql('ALTER TABLE user_trip_location DROP FOREIGN KEY FK_1841178BFDB13004'); - $this->addSql('ALTER TABLE user_trip_work_log DROP FOREIGN KEY FK_B38EA119FDB13004'); - $this->addSql('ALTER TABLE user_trip_work_log DROP FOREIGN KEY FK_B38EA1195C3A313A'); - $this->addSql('ALTER TABLE user_trip_work_log DROP FOREIGN KEY FK_B38EA119C43C7F1'); - $this->addSql('DROP TABLE user_trip_location'); - $this->addSql('DROP TABLE user_trip_work_log'); - $this->addSql('ALTER TABLE trip_location ADD is_arrival TINYINT(1) NOT NULL'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('CREATE TABLE user_trip_location (id INT AUTO_INCREMENT NOT NULL, user_trip_id INT NOT NULL, location_id INT NOT NULL, planned_date DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_1841178BFDB13004 (user_trip_id), INDEX IDX_1841178B64D218E (location_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' '); - $this->addSql('CREATE TABLE user_trip_work_log (id INT AUTO_INCREMENT NOT NULL, user_trip_id INT NOT NULL, start_location_id INT NOT NULL, end_location_id INT NOT NULL, start_date DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', end_date DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_B38EA119C43C7F1 (end_location_id), INDEX IDX_B38EA119FDB13004 (user_trip_id), INDEX IDX_B38EA1195C3A313A (start_location_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' '); - $this->addSql('ALTER TABLE user_trip_location ADD CONSTRAINT FK_1841178B64D218E FOREIGN KEY (location_id) REFERENCES location (id)'); - $this->addSql('ALTER TABLE user_trip_location ADD CONSTRAINT FK_1841178BFDB13004 FOREIGN KEY (user_trip_id) REFERENCES user_trip (id)'); - $this->addSql('ALTER TABLE user_trip_work_log ADD CONSTRAINT FK_B38EA119FDB13004 FOREIGN KEY (user_trip_id) REFERENCES user_trip (id)'); - $this->addSql('ALTER TABLE user_trip_work_log ADD CONSTRAINT FK_B38EA1195C3A313A FOREIGN KEY (start_location_id) REFERENCES location (id)'); - $this->addSql('ALTER TABLE user_trip_work_log ADD CONSTRAINT FK_B38EA119C43C7F1 FOREIGN KEY (end_location_id) REFERENCES location (id)'); - $this->addSql('ALTER TABLE user_trip_event DROP FOREIGN KEY FK_46824C08FDB13004'); - $this->addSql('ALTER TABLE user_trip_event DROP FOREIGN KEY FK_46824C0871F7E88B'); - $this->addSql('DROP TABLE event'); - $this->addSql('DROP TABLE user_trip_event'); - $this->addSql('ALTER TABLE trip_location DROP is_arrival'); - } -} diff --git a/httpdocs/migrations/Version20250303152548.php b/httpdocs/migrations/Version20250303152548.php deleted file mode 100644 index c74700b..0000000 --- a/httpdocs/migrations/Version20250303152548.php +++ /dev/null @@ -1,31 +0,0 @@ -addSql('ALTER TABLE event CHANGE `order` sequence INT UNSIGNED NOT NULL'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE event CHANGE sequence `order` INT UNSIGNED NOT NULL'); - } -} diff --git a/httpdocs/migrations/Version20250304114315.php b/httpdocs/migrations/Version20250304114315.php deleted file mode 100644 index a8845f4..0000000 --- a/httpdocs/migrations/Version20250304114315.php +++ /dev/null @@ -1,31 +0,0 @@ -addSql('ALTER TABLE user_trip_event ADD note LONGTEXT DEFAULT NULL'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE user_trip_event DROP note'); - } -} diff --git a/httpdocs/migrations/Version20250304115016.php b/httpdocs/migrations/Version20250304115016.php deleted file mode 100644 index 6bde2c6..0000000 --- a/httpdocs/migrations/Version20250304115016.php +++ /dev/null @@ -1,33 +0,0 @@ -addSql('DROP INDEX UNIQ_7656F53B69AF50E7 ON trip'); - $this->addSql('ALTER TABLE trip DROP pilotage_reference'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE trip ADD pilotage_reference VARCHAR(255) NOT NULL'); - $this->addSql('CREATE UNIQUE INDEX UNIQ_7656F53B69AF50E7 ON trip (pilotage_reference)'); - } -} diff --git a/httpdocs/migrations/Version20250304122802.php b/httpdocs/migrations/Version20250304122802.php deleted file mode 100644 index ca3b3e8..0000000 --- a/httpdocs/migrations/Version20250304122802.php +++ /dev/null @@ -1,31 +0,0 @@ -addSql('ALTER TABLE trip CHANGE cruise_reference cruise_reference VARCHAR(255) DEFAULT NULL'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE trip CHANGE cruise_reference cruise_reference VARCHAR(255) NOT NULL'); - } -} diff --git a/httpdocs/migrations/Version20250304124329.php b/httpdocs/migrations/Version20250304124329.php deleted file mode 100644 index d4a4b35..0000000 --- a/httpdocs/migrations/Version20250304124329.php +++ /dev/null @@ -1,31 +0,0 @@ -addSql('ALTER TABLE trip CHANGE cruise_reference customer_reference VARCHAR(255) DEFAULT NULL'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE trip CHANGE customer_reference cruise_reference VARCHAR(255) DEFAULT NULL'); - } -} diff --git a/httpdocs/migrations/Version20250310140210.php b/httpdocs/migrations/Version20250310140210.php deleted file mode 100644 index fea4c4b..0000000 --- a/httpdocs/migrations/Version20250310140210.php +++ /dev/null @@ -1,35 +0,0 @@ -addSql('ALTER TABLE user_trip ADD signature_id INT DEFAULT NULL, ADD completed_date DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', DROP start_date, DROP end_date'); - $this->addSql('ALTER TABLE user_trip ADD CONSTRAINT FK_CD7B9F2ED61183A FOREIGN KEY (signature_id) REFERENCES media_object (id) ON DELETE SET NULL'); - $this->addSql('CREATE INDEX IDX_CD7B9F2ED61183A ON user_trip (signature_id)'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE user_trip DROP FOREIGN KEY FK_CD7B9F2ED61183A'); - $this->addSql('DROP INDEX IDX_CD7B9F2ED61183A ON user_trip'); - $this->addSql('ALTER TABLE user_trip ADD end_date DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', DROP signature_id, CHANGE completed_date start_date DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\''); - } -} diff --git a/httpdocs/migrations/Version20250310141546.php b/httpdocs/migrations/Version20250310141546.php deleted file mode 100644 index f43862c..0000000 --- a/httpdocs/migrations/Version20250310141546.php +++ /dev/null @@ -1,31 +0,0 @@ -addSql('CREATE UNIQUE INDEX unique_user_trip ON user_trip (trip_id, user_id)'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('DROP INDEX unique_user_trip ON user_trip'); - } -} diff --git a/httpdocs/migrations/Version20250311143225.php b/httpdocs/migrations/Version20250311143225.php deleted file mode 100644 index 92877bd..0000000 --- a/httpdocs/migrations/Version20250311143225.php +++ /dev/null @@ -1,31 +0,0 @@ -addSql('ALTER TABLE user_trip CHANGE captain_name captain_name VARCHAR(255) DEFAULT NULL, CHANGE completed_date completed_date DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\''); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE user_trip CHANGE captain_name captain_name VARCHAR(255) NOT NULL, CHANGE completed_date completed_date DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\''); - } -} diff --git a/httpdocs/migrations/Version20250312165234.php b/httpdocs/migrations/Version20250312165234.php deleted file mode 100644 index dda777f..0000000 --- a/httpdocs/migrations/Version20250312165234.php +++ /dev/null @@ -1,31 +0,0 @@ -addSql('ALTER TABLE user_trip ADD completed TINYINT(1) NOT NULL'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE user_trip DROP completed'); - } -} diff --git a/httpdocs/migrations/Version20250317140441.php b/httpdocs/migrations/Version20250317140441.php deleted file mode 100644 index eb8b42d..0000000 --- a/httpdocs/migrations/Version20250317140441.php +++ /dev/null @@ -1,35 +0,0 @@ -addSql('ALTER TABLE user_trip_event ADD location_id INT NOT NULL'); - $this->addSql('ALTER TABLE user_trip_event ADD CONSTRAINT FK_46824C0864D218E FOREIGN KEY (location_id) REFERENCES location (id)'); - $this->addSql('CREATE INDEX IDX_46824C0864D218E ON user_trip_event (location_id)'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE user_trip_event DROP FOREIGN KEY FK_46824C0864D218E'); - $this->addSql('DROP INDEX IDX_46824C0864D218E ON user_trip_event'); - $this->addSql('ALTER TABLE user_trip_event DROP location_id'); - } -} diff --git a/httpdocs/migrations/Version20250324103944.php b/httpdocs/migrations/Version20250324103944.php new file mode 100644 index 0000000..c73dd2b --- /dev/null +++ b/httpdocs/migrations/Version20250324103944.php @@ -0,0 +1,81 @@ +addSql('CREATE TABLE event (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, identifier VARCHAR(255) NOT NULL, sequence INT UNSIGNED NOT NULL, mandatory TINYINT(1) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', UNIQUE INDEX UNIQ_3BAE0AA75E237E06 (name), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE location (id INT AUTO_INCREMENT NOT NULL, zone_id INT NOT NULL, code VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, is_zone TINYINT(1) NOT NULL, is_place TINYINT(1) NOT NULL, is_port TINYINT(1) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_5E9E89CB9F2C3FAB (zone_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE media_object (id INT AUTO_INCREMENT NOT NULL, created_by_id INT NOT NULL, file_path VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_14D43132B03A8386 (created_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE shipping_company (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, code VARCHAR(255) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', UNIQUE INDEX UNIQ_A9F70F8B77153098 (code), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE trip (id INT AUTO_INCREMENT NOT NULL, vessel_id INT NOT NULL, start_location_id INT NOT NULL, end_location_id INT NOT NULL, customer_reference VARCHAR(255) DEFAULT NULL, captain_name VARCHAR(255) DEFAULT NULL, start_date DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', end_date DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', note LONGTEXT DEFAULT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_7656F53B14AF1953 (vessel_id), INDEX IDX_7656F53B5C3A313A (start_location_id), INDEX IDX_7656F53BC43C7F1 (end_location_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE trip_location (id INT AUTO_INCREMENT NOT NULL, trip_id INT NOT NULL, location_id INT NOT NULL, is_arrival TINYINT(1) NOT NULL, date DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_F6CFBADBA5BC2E0E (trip_id), INDEX IDX_F6CFBADB64D218E (location_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE `user` (id INT AUTO_INCREMENT NOT NULL, image_id INT DEFAULT NULL, email VARCHAR(180) NOT NULL, reference_id VARCHAR(255) NOT NULL, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, roles JSON NOT NULL COMMENT \'(DC2Type:json)\', password VARCHAR(255) NOT NULL, active TINYINT(1) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', UNIQUE INDEX UNIQ_8D93D649E7927C74 (email), INDEX IDX_8D93D6493DA5256D (image_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE user_trip (id INT AUTO_INCREMENT NOT NULL, trip_id INT NOT NULL, user_id INT NOT NULL, signature_id INT DEFAULT NULL, captain_name VARCHAR(255) DEFAULT NULL, completed TINYINT(1) NOT NULL, completed_date DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_CD7B9F2A5BC2E0E (trip_id), INDEX IDX_CD7B9F2A76ED395 (user_id), INDEX IDX_CD7B9F2ED61183A (signature_id), UNIQUE INDEX unique_user_trip (trip_id, user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE user_trip_event (id INT AUTO_INCREMENT NOT NULL, user_trip_id INT NOT NULL, event_id INT NOT NULL, location_id INT NOT NULL, date DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', note LONGTEXT DEFAULT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_46824C08FDB13004 (user_trip_id), INDEX IDX_46824C0871F7E88B (event_id), INDEX IDX_46824C0864D218E (location_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE vessel (id INT AUTO_INCREMENT NOT NULL, company_id INT NOT NULL, name VARCHAR(255) NOT NULL, code VARCHAR(255) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', UNIQUE INDEX UNIQ_4ED8DCA877153098 (code), INDEX IDX_4ED8DCA8979B1AD6 (company_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE zone (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('ALTER TABLE location ADD CONSTRAINT FK_5E9E89CB9F2C3FAB FOREIGN KEY (zone_id) REFERENCES zone (id)'); + $this->addSql('ALTER TABLE media_object ADD CONSTRAINT FK_14D43132B03A8386 FOREIGN KEY (created_by_id) REFERENCES `user` (id) ON DELETE CASCADE'); + $this->addSql('ALTER TABLE trip ADD CONSTRAINT FK_7656F53B14AF1953 FOREIGN KEY (vessel_id) REFERENCES vessel (id)'); + $this->addSql('ALTER TABLE trip ADD CONSTRAINT FK_7656F53B5C3A313A FOREIGN KEY (start_location_id) REFERENCES location (id)'); + $this->addSql('ALTER TABLE trip ADD CONSTRAINT FK_7656F53BC43C7F1 FOREIGN KEY (end_location_id) REFERENCES location (id)'); + $this->addSql('ALTER TABLE trip_location ADD CONSTRAINT FK_F6CFBADBA5BC2E0E FOREIGN KEY (trip_id) REFERENCES trip (id)'); + $this->addSql('ALTER TABLE trip_location ADD CONSTRAINT FK_F6CFBADB64D218E FOREIGN KEY (location_id) REFERENCES location (id)'); + $this->addSql('ALTER TABLE `user` ADD CONSTRAINT FK_8D93D6493DA5256D FOREIGN KEY (image_id) REFERENCES media_object (id) ON DELETE SET NULL'); + $this->addSql('ALTER TABLE user_trip ADD CONSTRAINT FK_CD7B9F2A5BC2E0E FOREIGN KEY (trip_id) REFERENCES trip (id)'); + $this->addSql('ALTER TABLE user_trip ADD CONSTRAINT FK_CD7B9F2A76ED395 FOREIGN KEY (user_id) REFERENCES `user` (id)'); + $this->addSql('ALTER TABLE user_trip ADD CONSTRAINT FK_CD7B9F2ED61183A FOREIGN KEY (signature_id) REFERENCES media_object (id) ON DELETE SET NULL'); + $this->addSql('ALTER TABLE user_trip_event ADD CONSTRAINT FK_46824C08FDB13004 FOREIGN KEY (user_trip_id) REFERENCES user_trip (id)'); + $this->addSql('ALTER TABLE user_trip_event ADD CONSTRAINT FK_46824C0871F7E88B FOREIGN KEY (event_id) REFERENCES event (id)'); + $this->addSql('ALTER TABLE user_trip_event ADD CONSTRAINT FK_46824C0864D218E FOREIGN KEY (location_id) REFERENCES location (id)'); + $this->addSql('ALTER TABLE vessel ADD CONSTRAINT FK_4ED8DCA8979B1AD6 FOREIGN KEY (company_id) REFERENCES shipping_company (id)'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE location DROP FOREIGN KEY FK_5E9E89CB9F2C3FAB'); + $this->addSql('ALTER TABLE media_object DROP FOREIGN KEY FK_14D43132B03A8386'); + $this->addSql('ALTER TABLE trip DROP FOREIGN KEY FK_7656F53B14AF1953'); + $this->addSql('ALTER TABLE trip DROP FOREIGN KEY FK_7656F53B5C3A313A'); + $this->addSql('ALTER TABLE trip DROP FOREIGN KEY FK_7656F53BC43C7F1'); + $this->addSql('ALTER TABLE trip_location DROP FOREIGN KEY FK_F6CFBADBA5BC2E0E'); + $this->addSql('ALTER TABLE trip_location DROP FOREIGN KEY FK_F6CFBADB64D218E'); + $this->addSql('ALTER TABLE `user` DROP FOREIGN KEY FK_8D93D6493DA5256D'); + $this->addSql('ALTER TABLE user_trip DROP FOREIGN KEY FK_CD7B9F2A5BC2E0E'); + $this->addSql('ALTER TABLE user_trip DROP FOREIGN KEY FK_CD7B9F2A76ED395'); + $this->addSql('ALTER TABLE user_trip DROP FOREIGN KEY FK_CD7B9F2ED61183A'); + $this->addSql('ALTER TABLE user_trip_event DROP FOREIGN KEY FK_46824C08FDB13004'); + $this->addSql('ALTER TABLE user_trip_event DROP FOREIGN KEY FK_46824C0871F7E88B'); + $this->addSql('ALTER TABLE user_trip_event DROP FOREIGN KEY FK_46824C0864D218E'); + $this->addSql('ALTER TABLE vessel DROP FOREIGN KEY FK_4ED8DCA8979B1AD6'); + $this->addSql('DROP TABLE event'); + $this->addSql('DROP TABLE location'); + $this->addSql('DROP TABLE media_object'); + $this->addSql('DROP TABLE shipping_company'); + $this->addSql('DROP TABLE trip'); + $this->addSql('DROP TABLE trip_location'); + $this->addSql('DROP TABLE `user`'); + $this->addSql('DROP TABLE user_trip'); + $this->addSql('DROP TABLE user_trip_event'); + $this->addSql('DROP TABLE vessel'); + $this->addSql('DROP TABLE zone'); + } +} diff --git a/httpdocs/public/media/gizmo-smurf-vic-george-6731e1217005e794606442.webp b/httpdocs/public/media/gizmo-smurf-vic-george-6731e1217005e794606442.webp deleted file mode 100644 index 8b9c6ec..0000000 Binary files a/httpdocs/public/media/gizmo-smurf-vic-george-6731e1217005e794606442.webp and /dev/null differ diff --git a/httpdocs/public/media/images-6731e120f2ebd169493980.png b/httpdocs/public/media/images-6731e120f2ebd169493980.png deleted file mode 100644 index f08553e..0000000 Binary files a/httpdocs/public/media/images-6731e120f2ebd169493980.png and /dev/null differ diff --git a/httpdocs/public/media/slouchy-smurfling-tv-characters-photo-u1-6731e120f2815244594178.jpg b/httpdocs/public/media/slouchy-smurfling-tv-characters-photo-u1-6731e120f2815244594178.jpg deleted file mode 100644 index 7d24073..0000000 Binary files a/httpdocs/public/media/slouchy-smurfling-tv-characters-photo-u1-6731e120f2815244594178.jpg and /dev/null differ diff --git a/httpdocs/public/media/tailor-smurf-tv-characters-photo-u1-6731e12083dee620188146.jpg b/httpdocs/public/media/tailor-smurf-tv-characters-photo-u1-6731e12083dee620188146.jpg deleted file mode 100644 index c3ba0c3..0000000 Binary files a/httpdocs/public/media/tailor-smurf-tv-characters-photo-u1-6731e12083dee620188146.jpg and /dev/null differ