diff --git a/src/Campaigns/Migrations/Tables/AddCampaignTypeColumn.php b/src/Campaigns/Migrations/Tables/AddCampaignTypeColumn.php deleted file mode 100644 index d54b13d12f..0000000000 --- a/src/Campaigns/Migrations/Tables/AddCampaignTypeColumn.php +++ /dev/null @@ -1,55 +0,0 @@ -give_campaigns} ADD COLUMN `campaign_type` VARCHAR(12) NOT NULL DEFAULT ''"); - } catch (DatabaseQueryException $exception) { - throw new DatabaseMigrationException("An error occurred while updating the {$wpdb->give_campaigns} table", 0, $exception); - } - } -} diff --git a/src/Campaigns/Migrations/Tables/CreateCampaignsTable.php b/src/Campaigns/Migrations/Tables/CreateCampaignsTable.php index b028eed261..8bd6b2dec8 100644 --- a/src/Campaigns/Migrations/Tables/CreateCampaignsTable.php +++ b/src/Campaigns/Migrations/Tables/CreateCampaignsTable.php @@ -18,7 +18,7 @@ class CreateCampaignsTable extends Migration */ public static function id(): string { - return 'give-campaigns-create-give-campaigns-table'; + return 'give-campaigns-create-give-core-campaigns-table'; } /** @@ -51,6 +51,7 @@ public function run() $sql = "CREATE TABLE $table ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, form_id INT NOT NULL, + campaign_type VARCHAR(12) NOT NULL DEFAULT '', campaign_title TEXT NOT NULL, campaign_url TEXT NOT NULL, short_desc TEXT NOT NULL, diff --git a/src/Campaigns/ServiceProvider.php b/src/Campaigns/ServiceProvider.php index 4d2169c748..8e8935f337 100644 --- a/src/Campaigns/ServiceProvider.php +++ b/src/Campaigns/ServiceProvider.php @@ -2,7 +2,6 @@ namespace Give\Campaigns; -use Give\Campaigns\Migrations\Tables\AddCampaignTypeColumn; use Give\Campaigns\Migrations\Tables\CreateCampaignFormsTable; use Give\Campaigns\Migrations\Tables\CreateCampaignsTable; use Give\Framework\Migrations\MigrationsRegister; @@ -45,7 +44,6 @@ private function registerMigrations(): void give(MigrationsRegister::class)->addMigrations( [ CreateCampaignsTable::class, - AddCampaignTypeColumn::class, CreateCampaignFormsTable::class, ] );