diff --git a/source/data/tables.sql b/source/data/tables.sql index 2c287203dc8..8cdbf7488c9 100644 --- a/source/data/tables.sql +++ b/source/data/tables.sql @@ -7,9 +7,9 @@ CREATE TABLE attendee_shifts ("id" bigint, "shift_id" bigint, "attendee_id" bigi DROP TABLE IF EXISTS attendees; CREATE TABLE attendees ("id" integer, "event_id" integer, "member_id" integer, "email" CHARACTER VARYING(max), "first_name" CHARACTER VARYING(max), "last_name" CHARACTER VARYING(max), "phone_number" CHARACTER VARYING(max), "postcode" CHARACTER VARYING(max), "created_at" timestamp without time zone, "country" CHARACTER VARYING(max), "new_member" boolean, "attending_status" CHARACTER VARYING(max), "generated_local_chapter_member_id" integer, "cached_organisation_slug" CHARACTER VARYING(max), "additional_fields" CHARACTER VARYING(max), "external_action_id" CHARACTER VARYING(max), "join_organisation" boolean, "join_list_suppressed" boolean, "source" CHARACTER VARYING(max), "old_daisy_chain_used" CHARACTER VARYING(max), "token" CHARACTER VARYING(max), "eu_data_processing_consent" boolean, "consent_content_version_id" bigint, "daisy_chain_id_used" bigint, "email_opt_in_type_id" bigint, "locale" CHARACTER VARYING(max), "notification_level" CHARACTER VARYING(max), "confirmed_at" timestamp without time zone, "confirmed_reason" CHARACTER VARYING(max), "confirmation_token" CHARACTER VARYING(max), "confirmation_sent_at" timestamp without time zone, "unsubscribe_at" timestamp without time zone, "updated_at" timestamp without time zone, "synced_to_crm_at" timestamp without time zone, "utm_params" CHARACTER VARYING(max), "postcode_id" bigint, "referring_share_click_id" integer, "opt_in_sms" boolean, "sms_opt_in_type_id" bigint, "recaptcha_score" numeric(3,2), "new_mobile_subscriber" boolean, "external_ids" CHARACTER VARYING(max), "from_one_click" boolean, "partnership_opt_ins" CHARACTER VARYING(max), "after_action" CHARACTER VARYING(max), "user_ip" CHARACTER VARYING(max), "user_agent" CHARACTER VARYING(max)); DROP TABLE IF EXISTS blast_emails; -CREATE TABLE blast_emails ("id" integer, "petition_id" integer, "from_name" CHARACTER VARYING(max), "reply_to_address" CHARACTER VARYING(max), "subject" CHARACTER VARYING(max), "created_at" timestamp without time zone, "updated_at" timestamp without time zone, "recipient_count" integer, "admin_status" CHARACTER VARYING(max), "delivery_status" CHARACTER VARYING(max), "administered_at" timestamp without time zone, "admin_reason" CHARACTER VARYING(max), "type" CHARACTER VARYING(max), "organisation_id" integer, "target_recipients" CHARACTER VARYING(max), "event_id" integer, "deliver_at" timestamp without time zone, "deliver_at_time_zone" CHARACTER VARYING(max), "partnership_id" bigint, "locale" CHARACTER VARYING(max), "reviewer_type" CHARACTER VARYING(max), "reviewer_id" bigint, "author_id" integer, "editor_mode" CHARACTER VARYING(max)); +CREATE TABLE blast_emails ("id" integer, "petition_id" integer, "from_name" CHARACTER VARYING(max), "reply_to_address" CHARACTER VARYING(max), "subject" CHARACTER VARYING(max), "created_at" timestamp without time zone, "updated_at" timestamp without time zone, "recipient_count" integer, "admin_status" CHARACTER VARYING(max), "delivery_status" CHARACTER VARYING(max), "administered_at" timestamp without time zone, "admin_reason" CHARACTER VARYING(max), "type" CHARACTER VARYING(max), "organisation_id" integer, "event_id" integer, "deliver_at" timestamp without time zone, "deliver_at_time_zone" CHARACTER VARYING(max), "partnership_id" bigint, "locale" CHARACTER VARYING(max), "reviewer_type" CHARACTER VARYING(max), "reviewer_id" bigint, "author_id" integer, "editor_mode" CHARACTER VARYING(max), "recipients_filter" CHARACTER VARYING(max)); DROP TABLE IF EXISTS calendars; -CREATE TABLE calendars ("id" integer, "slug" CHARACTER VARYING(max), "organisation_id" integer, "created_at" timestamp without time zone, "updated_at" timestamp without time zone, "archived_at" timestamp without time zone, "default_event_title" CHARACTER VARYING(max), "default_event_description" CHARACTER VARYING(max), "default_event_start" timestamp without time zone, "target_collection_id" integer, "auto_approved_events" boolean, "requires_organiser_instructions" boolean, "ask_host_address" boolean, "external_ids" CHARACTER VARYING(max), "disable_event_creation" boolean, "show_target_data_on_event_creation" boolean, "allow_multiple_events_per_constituency" boolean, "default_event_end" timestamp without time zone, "redirect_to" CHARACTER VARYING(max), "launched" boolean, "created_through_wizard" boolean, "current_wizard_step" CHARACTER VARYING(max), "default_event_forum_enabled" boolean, "region_id" bigint, "default_event_image_file_name" CHARACTER VARYING(max), "default_event_image_content_type" CHARACTER VARYING(max), "default_event_image_file_size" bigint, "default_event_image_updated_at" timestamp without time zone, "social_share_image_file_name" CHARACTER VARYING(max), "social_share_image_content_type" CHARACTER VARYING(max), "social_share_image_file_size" bigint, "social_share_image_updated_at" timestamp without time zone, "theme_id" bigint, "default_event_time_is_local" boolean, "default_event_time_zone" CHARACTER VARYING(max)); +CREATE TABLE calendars ("id" integer, "slug" CHARACTER VARYING(max), "organisation_id" integer, "created_at" timestamp without time zone, "updated_at" timestamp without time zone, "archived_at" timestamp without time zone, "default_event_title" CHARACTER VARYING(max), "default_event_start" timestamp without time zone, "target_collection_id" integer, "auto_approved_events" boolean, "requires_organiser_instructions" boolean, "ask_host_address" boolean, "external_ids" CHARACTER VARYING(max), "disable_event_creation" boolean, "show_target_data_on_event_creation" boolean, "allow_multiple_events_per_constituency" boolean, "default_event_end" timestamp without time zone, "redirect_to" CHARACTER VARYING(max), "launched" boolean, "created_through_wizard" boolean, "current_wizard_step" CHARACTER VARYING(max), "default_event_forum_enabled" boolean, "region_id" bigint, "default_event_image_file_name" CHARACTER VARYING(max), "default_event_image_content_type" CHARACTER VARYING(max), "default_event_image_file_size" bigint, "default_event_image_updated_at" timestamp without time zone, "social_share_image_file_name" CHARACTER VARYING(max), "social_share_image_content_type" CHARACTER VARYING(max), "social_share_image_file_size" bigint, "social_share_image_updated_at" timestamp without time zone, "theme_id" bigint, "default_event_time_is_local" boolean, "default_event_time_zone" CHARACTER VARYING(max)); DROP TABLE IF EXISTS campaign_admins; CREATE TABLE campaign_admins ("id" integer, "user_id" integer, "invitation_email" CHARACTER VARYING(max), "invitation_token" CHARACTER VARYING(max), "campaign_id" integer, "campaign_type" CHARACTER VARYING(max), "external_ids" CHARACTER VARYING(max), "created_at" timestamp(6) without time zone, "updated_at" timestamp(6) without time zone); DROP TABLE IF EXISTS campaigns_partnerships; @@ -41,7 +41,7 @@ CREATE TABLE data_processing_consents ("id" bigint, "data_processing_consentable DROP TABLE IF EXISTS drip_email_preferences; CREATE TABLE drip_email_preferences ("id" integer, "organisation_id" integer, "slug" CHARACTER VARYING(max), "enabled" boolean, "created_at" timestamp without time zone, "updated_at" timestamp without time zone); DROP TABLE IF EXISTS efforts; -CREATE TABLE efforts ("id" integer, "organisation_id" integer, "slug" CHARACTER VARYING(max), "title_default" CHARACTER VARYING(max), "who_default" CHARACTER VARYING(max), "what_default" CHARACTER VARYING(max), "why_default" CHARACTER VARYING(max), "created_at" timestamp without time zone, "updated_at" timestamp without time zone, "image_file_name" CHARACTER VARYING(max), "image_content_type" CHARACTER VARYING(max), "image_file_size" integer, "image_updated_at" timestamp without time zone, "ask_for_location" boolean, "effort_type" CHARACTER VARYING(max), "distance_limit" integer, "prompt_edit_individual_petition" boolean, "featured" boolean, "image_default_file_name" CHARACTER VARYING(max), "image_default_content_type" CHARACTER VARYING(max), "image_default_file_size" integer, "image_default_updated_at" timestamp without time zone, "target_collection_id" integer, "settings" CHARACTER VARYING(max), "hub_banner_file_name" CHARACTER VARYING(max), "hub_banner_content_type" CHARACTER VARYING(max), "hub_banner_file_size" integer, "hub_banner_updated_at" timestamp without time zone, "new_petition_form_banner_file_name" CHARACTER VARYING(max), "new_petition_form_banner_content_type" CHARACTER VARYING(max), "new_petition_form_banner_file_size" integer, "new_petition_form_banner_updated_at" timestamp without time zone, "new_petition_facebook_share_file_name" CHARACTER VARYING(max), "new_petition_facebook_share_content_type" CHARACTER VARYING(max), "new_petition_facebook_share_file_size" integer, "new_petition_facebook_share_updated_at" timestamp without time zone, "custom_goal" integer, "global_signature_count_add_amount" integer, "search_method" CHARACTER VARYING(max), "launched" boolean, "wizard_fields" CHARACTER VARYING(max), "search_kind" CHARACTER VARYING(max), "objective_collection_id" integer, "theme_id" bigint, "external_ids" CHARACTER VARYING(max)); +CREATE TABLE efforts ("id" integer, "organisation_id" integer, "slug" CHARACTER VARYING(max), "title_default" CHARACTER VARYING(max), "who_default" CHARACTER VARYING(max), "created_at" timestamp without time zone, "updated_at" timestamp without time zone, "image_file_name" CHARACTER VARYING(max), "image_content_type" CHARACTER VARYING(max), "image_file_size" integer, "image_updated_at" timestamp without time zone, "ask_for_location" boolean, "effort_type" CHARACTER VARYING(max), "distance_limit" integer, "prompt_edit_individual_petition" boolean, "featured" boolean, "image_default_file_name" CHARACTER VARYING(max), "image_default_content_type" CHARACTER VARYING(max), "image_default_file_size" integer, "image_default_updated_at" timestamp without time zone, "target_collection_id" integer, "settings" CHARACTER VARYING(max), "hub_banner_file_name" CHARACTER VARYING(max), "hub_banner_content_type" CHARACTER VARYING(max), "hub_banner_file_size" integer, "hub_banner_updated_at" timestamp without time zone, "new_petition_form_banner_file_name" CHARACTER VARYING(max), "new_petition_form_banner_content_type" CHARACTER VARYING(max), "new_petition_form_banner_file_size" integer, "new_petition_form_banner_updated_at" timestamp without time zone, "new_petition_facebook_share_file_name" CHARACTER VARYING(max), "new_petition_facebook_share_content_type" CHARACTER VARYING(max), "new_petition_facebook_share_file_size" integer, "new_petition_facebook_share_updated_at" timestamp without time zone, "custom_goal" integer, "global_signature_count_add_amount" integer, "search_method" CHARACTER VARYING(max), "launched" boolean, "wizard_fields" CHARACTER VARYING(max), "search_kind" CHARACTER VARYING(max), "objective_collection_id" integer, "theme_id" bigint, "external_ids" CHARACTER VARYING(max)); DROP TABLE IF EXISTS email_opt_in_types; CREATE TABLE email_opt_in_types ("id" bigint, "organisation_id" bigint, "kind" CHARACTER VARYING(max), "mailable" boolean, "active" boolean, "created_at" timestamp without time zone, "updated_at" timestamp without time zone, "context" CHARACTER VARYING(max), "external_id" CHARACTER VARYING(max), "content_settings" CHARACTER VARYING(max)); DROP TABLE IF EXISTS email_opt_in_uploads; @@ -51,7 +51,7 @@ CREATE TABLE event_imports ("id" integer, "event_import_batch_id" integer, "impo DROP TABLE IF EXISTS event_types; CREATE TABLE event_types ("id" bigint, "organisation_id" bigint, "name" CHARACTER VARYING(max), "localized_names" CHARACTER VARYING(max), "created_at" timestamp without time zone, "updated_at" timestamp without time zone, "external_ids" CHARACTER VARYING(max), "crm_settings" CHARACTER VARYING(max)); DROP TABLE IF EXISTS events; -CREATE TABLE events ("id" integer, "title" CHARACTER VARYING(max), "description" CHARACTER VARYING(max), "slug" CHARACTER VARYING(max), "start_at" timestamp without time zone, "end_at" timestamp without time zone, "location_id" integer, "created_at" timestamp without time zone, "updated_at" timestamp without time zone, "user_id" integer, "organisation_id" integer, "calendar_id" integer, "admin_status" CHARACTER VARYING(max), "admin_reason" CHARACTER VARYING(max), "administered_at" timestamp without time zone, "max_attendees_count" integer, "locale" CHARACTER VARYING(max), "target_id" integer, "thank_attendee_email_content" CHARACTER VARYING(max), "approaching_event_attendee_email_content" CHARACTER VARYING(max), "notify_changes_to_attendees" boolean, "sharing_disabled" boolean, "host_address" CHARACTER VARYING(max), "cancel_reason" CHARACTER VARYING(max), "cancelled_at" timestamp without time zone, "local_chapter_id" integer, "launched_at" timestamp without time zone, "hidden_address" boolean, "promoted_from_waitlist_email_content" CHARACTER VARYING(max), "petition_id" integer, "extra_location_info" CHARACTER VARYING(max), "external_action_id" CHARACTER VARYING(max), "request_referer" CHARACTER VARYING(max), "time_zone" CHARACTER VARYING(max), "hidden_at" timestamp without time zone, "daisy_chain_id" bigint, "new_member_daisy_chain_id" bigint, "forum_enabled" boolean, "reviewer_id" integer, "event_type_id" integer, "region_id" bigint, "settings" CHARACTER VARYING(max), "campaigner_contactable" boolean, "crm_settings" CHARACTER VARYING(max), "created_by_id" bigint, "reviewer_type" CHARACTER VARYING(max), "mentor_id" bigint, "redirect_to" CHARACTER VARYING(max), "web_conference_url" CHARACTER VARYING(max), "virtual" boolean, "content_updated_at" timestamp without time zone, "external_ids" CHARACTER VARYING(max), "featured" boolean, "theme_id" bigint, "utm_params" CHARACTER VARYING(max), "location_venue" CHARACTER VARYING(max), "unconfirmed_location" boolean, "user_ip" CHARACTER VARYING(max), "user_agent" CHARACTER VARYING(max)); +CREATE TABLE events ("id" integer, "title" CHARACTER VARYING(max), "slug" CHARACTER VARYING(max), "start_at" timestamp without time zone, "end_at" timestamp without time zone, "location_id" integer, "created_at" timestamp without time zone, "updated_at" timestamp without time zone, "user_id" integer, "organisation_id" integer, "calendar_id" integer, "admin_status" CHARACTER VARYING(max), "admin_reason" CHARACTER VARYING(max), "administered_at" timestamp without time zone, "max_attendees_count" integer, "locale" CHARACTER VARYING(max), "target_id" integer, "thank_attendee_email_content" CHARACTER VARYING(max), "approaching_event_attendee_email_content" CHARACTER VARYING(max), "notify_changes_to_attendees" boolean, "sharing_disabled" boolean, "host_address" CHARACTER VARYING(max), "cancel_reason" CHARACTER VARYING(max), "cancelled_at" timestamp without time zone, "local_chapter_id" integer, "launched_at" timestamp without time zone, "hidden_address" boolean, "promoted_from_waitlist_email_content" CHARACTER VARYING(max), "petition_id" integer, "extra_location_info" CHARACTER VARYING(max), "external_action_id" CHARACTER VARYING(max), "request_referer" CHARACTER VARYING(max), "time_zone" CHARACTER VARYING(max), "hidden_at" timestamp without time zone, "daisy_chain_id" bigint, "new_member_daisy_chain_id" bigint, "forum_enabled" boolean, "reviewer_id" integer, "event_type_id" integer, "region_id" bigint, "settings" CHARACTER VARYING(max), "campaigner_contactable" boolean, "crm_settings" CHARACTER VARYING(max), "created_by_id" bigint, "reviewer_type" CHARACTER VARYING(max), "mentor_id" bigint, "redirect_to" CHARACTER VARYING(max), "web_conference_url" CHARACTER VARYING(max), "virtual" boolean, "content_updated_at" timestamp without time zone, "external_ids" CHARACTER VARYING(max), "featured" boolean, "theme_id" bigint, "utm_params" CHARACTER VARYING(max), "location_venue" CHARACTER VARYING(max), "unconfirmed_location" boolean, "user_ip" CHARACTER VARYING(max), "user_agent" CHARACTER VARYING(max)); DROP TABLE IF EXISTS export_download_logs; CREATE TABLE export_download_logs ("id" bigint, "user_id" bigint, "data_export_id" bigint, "created_at" timestamp without time zone); DROP TABLE IF EXISTS external_events; @@ -65,7 +65,7 @@ CREATE TABLE labels ("id" bigint, "organisation_id" bigint, "name" CHARACTER VAR DROP TABLE IF EXISTS local_chapter_members; CREATE TABLE local_chapter_members ("id" integer, "local_chapter_id" integer, "member_id" integer, "introduction" CHARACTER VARYING(max), "created_at" timestamp without time zone, "updated_at" timestamp without time zone, "email" CHARACTER VARYING(max), "first_name" CHARACTER VARYING(max), "last_name" CHARACTER VARYING(max), "phone_number" CHARACTER VARYING(max), "postcode" CHARACTER VARYING(max), "country" CHARACTER VARYING(max), "locale" CHARACTER VARYING(max), "notification_level" CHARACTER VARYING(max), "type" CHARACTER VARYING(max), "local_chapter_organiser_request_id" integer, "user_id" integer, "deleted_at" timestamp without time zone, "eu_data_processing_consent_at" timestamp without time zone, "external_ids" CHARACTER VARYING(max), "synced_to_crm_at" timestamp without time zone, "new_member" boolean, "additional_fields" CHARACTER VARYING(max), "cached_organisation_slug" CHARACTER VARYING(max), "utm_params" CHARACTER VARYING(max), "deleted_by_user_id" bigint); DROP TABLE IF EXISTS local_chapters; -CREATE TABLE local_chapters ("id" integer, "name" CHARACTER VARYING(max), "slug" CHARACTER VARYING(max), "organisation_id" integer, "geography_id" integer, "created_at" timestamp without time zone, "updated_at" timestamp without time zone, "description" CHARACTER VARYING(max), "local_chapter_collection_id" integer, "creation_survey_responses" CHARACTER VARYING(max), "location_id" integer, "welcome_email_content" CHARACTER VARYING(max), "last_activity_notification_sent_at" timestamp without time zone, "deleted_at" timestamp without time zone, "region_id" bigint, "unlisted" boolean, "mentor_id" bigint, "content_updated_at" timestamp without time zone, "external_ids" CHARACTER VARYING(max), "theme_id" bigint); +CREATE TABLE local_chapters ("id" integer, "name" CHARACTER VARYING(max), "slug" CHARACTER VARYING(max), "organisation_id" integer, "geography_id" integer, "created_at" timestamp without time zone, "updated_at" timestamp without time zone, "description" CHARACTER VARYING(max), "local_chapter_collection_id" integer, "creation_survey_responses" CHARACTER VARYING(max), "location_id" integer, "welcome_email_content" CHARACTER VARYING(max), "last_activity_notification_sent_at" timestamp without time zone, "deleted_at" timestamp without time zone, "region_id" bigint, "unlisted" boolean, "mentor_id" bigint, "content_updated_at" timestamp without time zone, "external_ids" CHARACTER VARYING(max), "theme_id" bigint, "status" CHARACTER VARYING(max)); DROP TABLE IF EXISTS locales; CREATE TABLE locales ("id" integer, "organisation_id" integer, "name" CHARACTER VARYING(max), "visible" boolean, "created_at" timestamp without time zone, "updated_at" timestamp without time zone, "external_ids" CHARACTER VARYING(max)); DROP TABLE IF EXISTS locations; @@ -91,7 +91,7 @@ CREATE TABLE petition_flags ("id" integer, "petition_id" integer, "created_at" t DROP TABLE IF EXISTS petition_starts; CREATE TABLE petition_starts ("id" bigint, "current_step" CHARACTER VARYING(max), "title" CHARACTER VARYING(max), "who" CHARACTER VARYING(max), "why" CHARACTER VARYING(max), "what" CHARACTER VARYING(max), "location_id" bigint, "organisation_id" bigint, "user_id" bigint, "started_petition_id" bigint, "partnership_id" bigint, "locale" CHARACTER VARYING(max), "external_action_id" CHARACTER VARYING(max), "source" CHARACTER VARYING(max), "created_at" timestamp(6) without time zone, "updated_at" timestamp(6) without time zone, "help_requested_at" timestamp without time zone, "email" CHARACTER VARYING(max), "member_id" bigint, "help_prompt_enabled" boolean, "local_chapter_id" bigint, "cannot_change_associated_partnership" boolean, "utm_params" CHARACTER VARYING(max)); DROP TABLE IF EXISTS petitions; -CREATE TABLE petitions ("id" integer, "title" CHARACTER VARYING(max), "who" CHARACTER VARYING(max), "why" CHARACTER VARYING(max), "what" CHARACTER VARYING(max), "created_at" timestamp without time zone, "updated_at" timestamp without time zone, "user_id" integer, "slug" CHARACTER VARYING(max), "organisation_id" integer, "delivery_details" CHARACTER VARYING(max), "hidden" boolean, "admin_status" CHARACTER VARYING(max), "launched" boolean, "campaigner_contactable" boolean, "admin_reason" CHARACTER VARYING(max), "administered_at" timestamp without time zone, "effort_id" integer, "source" CHARACTER VARYING(max), "location_id" integer, "alias" CHARACTER VARYING(max), "target_id" integer, "redirect_to" CHARACTER VARYING(max), "external_facebook_page" CHARACTER VARYING(max), "external_site" CHARACTER VARYING(max), "show_progress_bar" boolean, "comments_updated_at" timestamp without time zone, "successful" boolean, "ended_story" CHARACTER VARYING(max), "locale" CHARACTER VARYING(max), "settings" CHARACTER VARYING(max), "signature_count_add_amount" integer, "locked_fields" CHARACTER VARYING(max), "request_referer" CHARACTER VARYING(max), "spam_status" CHARACTER VARYING(max), "ended_type" CHARACTER VARYING(max), "ended_reason" CHARACTER VARYING(max), "external_action_id" CHARACTER VARYING(max), "custom_goal" integer, "events_enabled_email_sent_at" timestamp without time zone, "local_chapter_id" integer, "image_description" CHARACTER VARYING(max), "signature_behaviour" CHARACTER VARYING(max), "objective_id" integer, "daisy_chain_id" bigint, "new_member_daisy_chain_id" bigint, "region_id" bigint, "ended_at" timestamp without time zone, "reviewer_type" CHARACTER VARYING(max), "reviewer_id" bigint, "mentor_id" bigint, "content_updated_at" timestamp without time zone, "external_ids" CHARACTER VARYING(max), "theme_id" bigint, "utm_params" CHARACTER VARYING(max), "user_ip" CHARACTER VARYING(max), "user_agent" CHARACTER VARYING(max)); +CREATE TABLE petitions ("id" integer, "title" CHARACTER VARYING(max), "who" CHARACTER VARYING(max), "created_at" timestamp without time zone, "updated_at" timestamp without time zone, "user_id" integer, "slug" CHARACTER VARYING(max), "organisation_id" integer, "delivery_details" CHARACTER VARYING(max), "hidden" boolean, "admin_status" CHARACTER VARYING(max), "launched" boolean, "campaigner_contactable" boolean, "admin_reason" CHARACTER VARYING(max), "administered_at" timestamp without time zone, "effort_id" integer, "source" CHARACTER VARYING(max), "location_id" integer, "alias" CHARACTER VARYING(max), "target_id" integer, "redirect_to" CHARACTER VARYING(max), "external_facebook_page" CHARACTER VARYING(max), "external_site" CHARACTER VARYING(max), "show_progress_bar" boolean, "comments_updated_at" timestamp without time zone, "successful" boolean, "ended_story" CHARACTER VARYING(max), "locale" CHARACTER VARYING(max), "settings" CHARACTER VARYING(max), "signature_count_add_amount" integer, "locked_fields" CHARACTER VARYING(max), "request_referer" CHARACTER VARYING(max), "spam_status" CHARACTER VARYING(max), "ended_type" CHARACTER VARYING(max), "ended_reason" CHARACTER VARYING(max), "external_action_id" CHARACTER VARYING(max), "custom_goal" integer, "events_enabled_email_sent_at" timestamp without time zone, "local_chapter_id" integer, "image_description" CHARACTER VARYING(max), "signature_behaviour" CHARACTER VARYING(max), "objective_id" integer, "daisy_chain_id" bigint, "new_member_daisy_chain_id" bigint, "region_id" bigint, "ended_at" timestamp without time zone, "reviewer_type" CHARACTER VARYING(max), "reviewer_id" bigint, "mentor_id" bigint, "content_updated_at" timestamp without time zone, "external_ids" CHARACTER VARYING(max), "theme_id" bigint, "utm_params" CHARACTER VARYING(max), "user_ip" CHARACTER VARYING(max), "user_agent" CHARACTER VARYING(max)); DROP TABLE IF EXISTS regions; CREATE TABLE regions ("id" bigint, "organisation_id" bigint, "name" CHARACTER VARYING(max), "api_key" CHARACTER VARYING(max), "created_at" timestamp without time zone, "updated_at" timestamp without time zone, "geography_id" bigint, "slug" CHARACTER VARYING(max), "public" boolean, "theme_id" bigint); DROP TABLE IF EXISTS share_clicks;