diff --git a/app/migrations/Version20200415135706.php b/app/migrations/Version20200415135706.php new file mode 100644 index 00000000000..0fac221e32d --- /dev/null +++ b/app/migrations/Version20200415135706.php @@ -0,0 +1,35 @@ +getTable("{$this->prefix}form_fields")->hasColumn('mapped_object')) { + throw new SkipMigration('Schema includes this migration'); + } + } + + public function up(Schema $schema): void + { + $this->addSql("ALTER TABLE {$this->prefix}form_fields + ADD mapped_object VARCHAR(191) DEFAULT NULL, + ADD mapped_field VARCHAR(191) DEFAULT NULL"); + + // All field that starts with company belongs to the company object. + // Except the company field itself that belongs to the contact (lead) object. + $this->addSql("UPDATE {$this->prefix}form_fields + SET mapped_object = CASE + WHEN lead_field LIKE 'company%' AND lead_field != 'company' THEN 'company' + ELSE 'contact' + END, mapped_field = lead_field + WHERE lead_field IS NOT NULL"); + } +} diff --git a/app/migrations/Version20200513162918.php b/app/migrations/Version20200513162918.php new file mode 100644 index 00000000000..8793c7a8fae --- /dev/null +++ b/app/migrations/Version20200513162918.php @@ -0,0 +1,37 @@ +getTable("{$this->prefix}email_copies")->hasColumn('body_text')) { + throw new SkipMigration("The body_text column has already been added to the {$this->prefix}email_copies table."); + } + } + + public function up(Schema $schema): void + { + $this->addSql("ALTER TABLE {$this->prefix}email_copies ADD COLUMN `body_text` LONGTEXT NULL DEFAULT NULL AFTER `body`"); + } + + public function down(Schema $schema): void + { + $this->addSql("ALTER TABLE {$this->prefix}email_copies DROP COLUMN `body_text`"); + } +} diff --git a/app/release_metadata.json b/app/release_metadata.json index 61160eb02ff..0e1a20cb605 100644 --- a/app/release_metadata.json +++ b/app/release_metadata.json @@ -1,5 +1,5 @@ { - "version": "5.0.0", + "version": "5.0.1", "stability": "stable", "minimum_php_version": "8.0.2", "maximum_php_version": "8.1.99", @@ -7,5 +7,5 @@ "minimum_mariadb_version": "10.2.7", "show_php_version_warning_if_under": "8.0.2", "minimum_mautic_version": "4.4.10", - "announcement_url": "https://github.com/mautic/mautic/releases/tag/5.0.0" + "announcement_url": "https://github.com/mautic/mautic/releases/tag/5.0.1" }