Skip to content

Instantly share code, notes, and snippets.

@rickalday
Created April 9, 2025 17:34
Show Gist options
  • Save rickalday/f765cdc515f4a2c38b03e6ad2175078b to your computer and use it in GitHub Desktop.
Save rickalday/f765cdc515f4a2c38b03e6ad2175078b to your computer and use it in GitHub Desktop.
Error from migrate_forms_to_campaign_forms:
Migration Failed
Migration ID: migrate_forms_to_campaign_forms
Last run: 2025-04-04 15:10:48
Error details:
Give\Framework\Migrations\Exceptions\DatabaseMigrationException Object
(
[message:protected] => An error occurred while creating initial campaigns
[string:Exception:private] =>
[code:protected] => 0
[file:protected] => /var/www/friendsofoppenlander.org/wp-content/plugins/give/src/Campaigns/Migrations/MigrateFormsToCampaignForms.php
[line:protected] => 47
[trace:Exception:private] => Array
(
[0] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-content/plugins/give/src/Framework/Database/DB.php
[line] => 158
[function] => Give\Campaigns\Migrations\{closure}
[class] => Give\Campaigns\Migrations\MigrateFormsToCampaignForms
[type] => ->
)
[1] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-content/plugins/give/src/Campaigns/Migrations/MigrateFormsToCampaignForms.php
[line] => 49
[function] => transaction
[class] => Give\Framework\Database\DB
[type] => ::
)
[2] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-content/plugins/give/src/API/Endpoints/Migrations/RunMigration.php
[line] => 147
[function] => run
[class] => Give\Campaigns\Migrations\MigrateFormsToCampaignForms
[type] => ->
)
[3] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-includes/rest-api/class-wp-rest-server.php
[line] => 1292
[function] => runMigration
[class] => Give\API\Endpoints\Migrations\RunMigration
[type] => ->
)
[4] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-includes/rest-api/class-wp-rest-server.php
[line] => 1125
[function] => respond_to_request
[class] => WP_REST_Server
[type] => ->
)
[5] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-includes/rest-api/class-wp-rest-server.php
[line] => 439
[function] => dispatch
[class] => WP_REST_Server
[type] => ->
)
[6] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-includes/rest-api.php
[line] => 449
[function] => serve_request
[class] => WP_REST_Server
[type] => ->
)
[7] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-includes/class-wp-hook.php
[line] => 324
[function] => rest_api_loaded
)
[8] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-includes/class-wp-hook.php
[line] => 348
[function] => apply_filters
[class] => WP_Hook
[type] => ->
)
[9] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-includes/plugin.php
[line] => 565
[function] => do_action
[class] => WP_Hook
[type] => ->
)
[10] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-includes/class-wp.php
[line] => 418
[function] => do_action_ref_array
)
[11] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-includes/class-wp.php
[line] => 813
[function] => parse_request
[class] => WP
[type] => ->
)
[12] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-includes/functions.php
[line] => 1336
[function] => main
[class] => WP
[type] => ->
)
[13] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-blog-header.php
[line] => 16
[function] => wp
)
[14] => Array
(
[file] => /var/www/friendsofoppenlander.org/index.php
[line] => 17
[args] => Array
(
[0] => /var/www/friendsofoppenlander.org/wp-blog-header.php
)
[function] => require
)
)
[previous:Exception:private] => Give\Framework\Database\Exceptions\DatabaseQueryException Object
(
[message:protected] => Database Query
[string:Exception:private] =>
[code:protected] => 0
[file:protected] => /var/www/friendsofoppenlander.org/wp-content/plugins/give/src/Framework/Database/DB.php
[line:protected] => 247
[trace:Exception:private] => Array
(
[0] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-content/plugins/give/src/Framework/Database/DB.php
[line] => 95
[function] => runQueryWithErrorChecking
[class] => Give\Framework\Database\DB
[type] => ::
)
[1] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-content/plugins/give/src/Framework/QueryBuilder/Concerns/CRUD.php
[line] => 34
[function] => __callStatic
[class] => Give\Framework\Database\DB
[type] => ::
)
[2] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-content/plugins/give/src/Campaigns/Migrations/MigrateFormsToCampaignForms.php
[line] => 189
[function] => insert
[class] => Give\Framework\QueryBuilder\QueryBuilder
[type] => ->
)
[3] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-content/plugins/give/src/Campaigns/Migrations/MigrateFormsToCampaignForms.php
[line] => 178
[function] => addCampaignFormRelationship
[class] => Give\Campaigns\Migrations\MigrateFormsToCampaignForms
[type] => ->
)
[4] => Array
(
[function] => addUpgradedV2FormToCampaign
[class] => Give\Campaigns\Migrations\MigrateFormsToCampaignForms
[type] => ->
)
[5] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-content/plugins/give/src/Campaigns/Migrations/MigrateFormsToCampaignForms.php
[line] => 44
[function] => array_map
)
[6] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-content/plugins/give/src/Framework/Database/DB.php
[line] => 158
[function] => Give\Campaigns\Migrations\{closure}
[class] => Give\Campaigns\Migrations\MigrateFormsToCampaignForms
[type] => ->
)
[7] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-content/plugins/give/src/Campaigns/Migrations/MigrateFormsToCampaignForms.php
[line] => 49
[function] => transaction
[class] => Give\Framework\Database\DB
[type] => ::
)
[8] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-content/plugins/give/src/API/Endpoints/Migrations/RunMigration.php
[line] => 147
[function] => run
[class] => Give\Campaigns\Migrations\MigrateFormsToCampaignForms
[type] => ->
)
[9] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-includes/rest-api/class-wp-rest-server.php
[line] => 1292
[function] => runMigration
[class] => Give\API\Endpoints\Migrations\RunMigration
[type] => ->
)
[10] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-includes/rest-api/class-wp-rest-server.php
[line] => 1125
[function] => respond_to_request
[class] => WP_REST_Server
[type] => ->
)
[11] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-includes/rest-api/class-wp-rest-server.php
[line] => 439
[function] => dispatch
[class] => WP_REST_Server
[type] => ->
)
[12] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-includes/rest-api.php
[line] => 449
[function] => serve_request
[class] => WP_REST_Server
[type] => ->
)
[13] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-includes/class-wp-hook.php
[line] => 324
[function] => rest_api_loaded
)
[14] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-includes/class-wp-hook.php
[line] => 348
[function] => apply_filters
[class] => WP_Hook
[type] => ->
)
[15] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-includes/plugin.php
[line] => 565
[function] => do_action
[class] => WP_Hook
[type] => ->
)
[16] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-includes/class-wp.php
[line] => 418
[function] => do_action_ref_array
)
[17] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-includes/class-wp.php
[line] => 813
[function] => parse_request
[class] => WP
[type] => ->
)
[18] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-includes/functions.php
[line] => 1336
[function] => main
[class] => WP
[type] => ->
)
[19] => Array
(
[file] => /var/www/friendsofoppenlander.org/wp-blog-header.php
[line] => 16
[function] => wp
)
[20] => Array
(
[file] => /var/www/friendsofoppenlander.org/index.php
[line] => 17
[args] => Array
(
[0] => /var/www/friendsofoppenlander.org/wp-blog-header.php
)
[function] => require
)
)
[previous:Exception:private] =>
[queryErrors:Give\Framework\Database\Exceptions\DatabaseQueryException:private] => Array
(
[db_delta_error] => Array
(
[0] => Duplicate entry '1-190' for key 'cefo_give_campaign_forms.PRIMARY'
)
)
[query:Give\Framework\Database\Exceptions\DatabaseQueryException:private] => INSERT INTO `cefo_give_campaign_forms` (`form_id`, `campaign_id`) VALUES ('190', '1')
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment