Created
December 18, 2025 19:04
-
-
Save rickalday/cd1d7546d49735e3890bde78727cb867 to your computer and use it in GitHub Desktop.
Create missing Campaign tables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Change the wp_ prefix to match the WP prefix on your site | |
| -- Create give_campaigns table | |
| CREATE TABLE wp_give_campaigns ( | |
| id INT UNSIGNED NOT NULL AUTO_INCREMENT, | |
| campaign_page_id INT UNSIGNED NULL, | |
| 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, | |
| long_desc TEXT NOT NULL, | |
| campaign_logo TEXT NOT NULL, | |
| campaign_image TEXT NOT NULL, | |
| primary_color VARCHAR(7) NOT NULL, | |
| secondary_color VARCHAR(7) NOT NULL, | |
| campaign_goal INT UNSIGNED NOT NULL, | |
| goal_type VARCHAR(24) NOT NULL DEFAULT 'amount', | |
| status VARCHAR(12) NOT NULL, | |
| start_date DATETIME NULL, | |
| end_date DATETIME NULL, | |
| date_created DATETIME NOT NULL, | |
| PRIMARY KEY (id) | |
| ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci; | |
| -- Change the wp_ prefix to match the WP prefix on your site | |
| -- Create give_campaigns_forms table | |
| CREATE TABLE wp_give_campaign_forms ( | |
| campaign_id INT UNSIGNED NOT NULL, | |
| form_id INT UNSIGNED NOT NULL, | |
| KEY form_id (form_id), | |
| KEY campaign_id (campaign_id), | |
| PRIMARY KEY (campaign_id, form_id) | |
| ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment