From 9d20974abd971228a21a5a00feef42480763fb49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasia=20Jarmo=C5=82kowicz?= Date: Tue, 29 May 2018 17:31:55 +0200 Subject: [PATCH] wip --- app/models/campaign.rb | 11 +- .../_new_peer_to_peer_modal.html.erb | 21 +- ...ault_reason_for_supporting_to_campaigns.rb | 5 + db/structure.sql | 663 +++++++++--------- 4 files changed, 362 insertions(+), 338 deletions(-) create mode 100644 db/migrate/201810202124321_add_default_reason_for_supporting_to_campaigns.rb diff --git a/app/models/campaign.rb b/app/models/campaign.rb index ab7605d8..9570760e 100644 --- a/app/models/campaign.rb +++ b/app/models/campaign.rb @@ -34,7 +34,8 @@ class Campaign < ActiveRecord::Base :receipt_message, # text :hide_custom_amounts, # boolean :parent_campaign_id, - :reason_for_supporting + :reason_for_supporting, + :default_reason_for_supporting validate :end_datetime_cannot_be_in_past, :on => :create validates :profile, :presence => true @@ -177,4 +178,12 @@ class Campaign < ActiveRecord::Base excluded_for_peer_to_peer.push(customizable_attributes_list) attributes.except(*excluded_for_peer_to_peer) end + + def user_reason_for_supporting + if reason_for_supporting.present? + reason_for_supporting + else + default_reason_for_supporting + end + end end diff --git a/app/views/campaigns/_new_peer_to_peer_modal.html.erb b/app/views/campaigns/_new_peer_to_peer_modal.html.erb index 7d32811d..2a83360a 100644 --- a/app/views/campaigns/_new_peer_to_peer_modal.html.erb +++ b/app/views/campaigns/_new_peer_to_peer_modal.html.erb @@ -38,18 +38,16 @@
-
- -
+
+ + Uploading your picture will greatly increase the chances of a successful campaign. +
Upload
- -
- - -
<%= render 'components/forms/submit_button', button_text: 'Next', scope: 'new_p2p_campaign_wiz', branded: true %> @@ -64,6 +62,13 @@
+
+ + Be concise and honest about your intentions. + + +
+
diff --git a/db/migrate/201810202124321_add_default_reason_for_supporting_to_campaigns.rb b/db/migrate/201810202124321_add_default_reason_for_supporting_to_campaigns.rb new file mode 100644 index 00000000..521ade97 --- /dev/null +++ b/db/migrate/201810202124321_add_default_reason_for_supporting_to_campaigns.rb @@ -0,0 +1,5 @@ +class AddDefaultReasonForSupportingToCampaigns < ActiveRecord::Migration + def change + add_column :campaigns, :default_reason_for_supporting, :text + end +end diff --git a/db/structure.sql b/db/structure.sql index 7df2d0c1..5c08fffa 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -2,6 +2,7 @@ -- PostgreSQL database dump -- +<<<<<<< HEAD <<<<<<< HEAD -- Dumped from database version 9.6.5 -- Dumped by pg_dump version 9.6.10 @@ -9,13 +10,16 @@ -- Dumped from database version 9.6.8 -- Dumped by pg_dump version 9.6.8 >>>>>>> Add CampaignTemplate +======= +-- Dumped from database version 10.1 +-- Dumped by pg_dump version 10.1 +>>>>>>> wip SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; -SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; SET client_min_messages = warning; SET row_security = off; @@ -62,6 +66,8 @@ CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA public; COMMENT ON EXTENSION "uuid-ossp" IS 'generate universally unique identifiers (UUIDs)'; +SET search_path = public, pg_catalog; + -- -- Name: is_valid_json(text); Type: FUNCTION; Schema: public; Owner: - -- @@ -82,7 +88,7 @@ $$; -- Name: update_supporter_assoc_search_vectors(); Type: FUNCTION; Schema: public; Owner: - -- -CREATE FUNCTION public.update_supporter_assoc_search_vectors() RETURNS trigger +CREATE FUNCTION update_supporter_assoc_search_vectors() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN IF pg_trigger_depth() <> 1 THEN RETURN new; END IF; @@ -126,7 +132,7 @@ SET default_with_oids = false; -- Name: activities; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.activities ( +CREATE TABLE activities ( id integer NOT NULL, supporter_id integer, host_id integer, @@ -149,7 +155,7 @@ CREATE TABLE public.activities ( -- Name: activities_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.activities_id_seq +CREATE SEQUENCE activities_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -161,14 +167,14 @@ CREATE SEQUENCE public.activities_id_seq -- Name: activities_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.activities_id_seq OWNED BY public.activities.id; +ALTER SEQUENCE activities_id_seq OWNED BY activities.id; -- -- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.ar_internal_metadata ( +CREATE TABLE ar_internal_metadata ( key character varying NOT NULL, value character varying, created_at timestamp without time zone NOT NULL, @@ -180,7 +186,7 @@ CREATE TABLE public.ar_internal_metadata ( -- Name: bank_accounts; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.bank_accounts ( +CREATE TABLE bank_accounts ( id integer NOT NULL, name character varying(255), account_number character varying(255), @@ -202,7 +208,7 @@ CREATE TABLE public.bank_accounts ( -- Name: bank_accounts_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.bank_accounts_id_seq +CREATE SEQUENCE bank_accounts_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -214,14 +220,14 @@ CREATE SEQUENCE public.bank_accounts_id_seq -- Name: bank_accounts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.bank_accounts_id_seq OWNED BY public.bank_accounts.id; +ALTER SEQUENCE bank_accounts_id_seq OWNED BY bank_accounts.id; -- -- Name: billing_plans; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.billing_plans ( +CREATE TABLE billing_plans ( id integer NOT NULL, name character varying(255), stripe_plan_id character varying(255), @@ -238,7 +244,7 @@ CREATE TABLE public.billing_plans ( -- Name: billing_plans_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.billing_plans_id_seq +CREATE SEQUENCE billing_plans_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -250,14 +256,14 @@ CREATE SEQUENCE public.billing_plans_id_seq -- Name: billing_plans_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.billing_plans_id_seq OWNED BY public.billing_plans.id; +ALTER SEQUENCE billing_plans_id_seq OWNED BY billing_plans.id; -- -- Name: billing_subscriptions; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.billing_subscriptions ( +CREATE TABLE billing_subscriptions ( id integer NOT NULL, nonprofit_id integer, billing_plan_id integer, @@ -272,7 +278,7 @@ CREATE TABLE public.billing_subscriptions ( -- Name: billing_subscriptions_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.billing_subscriptions_id_seq +CREATE SEQUENCE billing_subscriptions_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -284,14 +290,14 @@ CREATE SEQUENCE public.billing_subscriptions_id_seq -- Name: billing_subscriptions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.billing_subscriptions_id_seq OWNED BY public.billing_subscriptions.id; +ALTER SEQUENCE billing_subscriptions_id_seq OWNED BY billing_subscriptions.id; -- -- Name: campaign_gift_options; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.campaign_gift_options ( +CREATE TABLE campaign_gift_options ( id integer NOT NULL, amount_one_time integer, description text, @@ -312,7 +318,7 @@ CREATE TABLE public.campaign_gift_options ( -- Name: campaign_gift_options_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.campaign_gift_options_id_seq +CREATE SEQUENCE campaign_gift_options_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -324,14 +330,14 @@ CREATE SEQUENCE public.campaign_gift_options_id_seq -- Name: campaign_gift_options_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.campaign_gift_options_id_seq OWNED BY public.campaign_gift_options.id; +ALTER SEQUENCE campaign_gift_options_id_seq OWNED BY campaign_gift_options.id; -- -- Name: campaign_gifts; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.campaign_gifts ( +CREATE TABLE campaign_gifts ( id integer NOT NULL, donation_id integer, campaign_gift_option_id integer, @@ -345,7 +351,7 @@ CREATE TABLE public.campaign_gifts ( -- Name: campaign_gifts_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.campaign_gifts_id_seq +CREATE SEQUENCE campaign_gifts_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -357,14 +363,14 @@ CREATE SEQUENCE public.campaign_gifts_id_seq -- Name: campaign_gifts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.campaign_gifts_id_seq OWNED BY public.campaign_gifts.id; +ALTER SEQUENCE campaign_gifts_id_seq OWNED BY campaign_gifts.id; -- -- Name: campaign_templates; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.campaign_templates ( +CREATE TABLE campaign_templates ( id integer NOT NULL, template_name character varying(255) NOT NULL, name character varying(255), @@ -386,7 +392,8 @@ CREATE TABLE public.campaign_templates ( -- Name: campaign_templates_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.campaign_templates_id_seq +CREATE SEQUENCE campaign_templates_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -398,14 +405,14 @@ CREATE SEQUENCE public.campaign_templates_id_seq -- Name: campaign_templates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.campaign_templates_id_seq OWNED BY public.campaign_templates.id; +ALTER SEQUENCE campaign_templates_id_seq OWNED BY campaign_templates.id; -- -- Name: campaigns; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.campaigns ( +CREATE TABLE campaigns ( id integer NOT NULL, name character varying(255), url character varying(255), @@ -441,7 +448,8 @@ CREATE TABLE public.campaigns ( external_identifier character varying(255), campaign_template_id integer, parent_campaign_id integer, - reason_for_supporting text + reason_for_supporting text, + default_reason_for_supporting text ); @@ -449,7 +457,7 @@ CREATE TABLE public.campaigns ( -- Name: campaigns_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.campaigns_id_seq +CREATE SEQUENCE campaigns_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -461,14 +469,14 @@ CREATE SEQUENCE public.campaigns_id_seq -- Name: campaigns_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.campaigns_id_seq OWNED BY public.campaigns.id; +ALTER SEQUENCE campaigns_id_seq OWNED BY campaigns.id; -- -- Name: cards; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.cards ( +CREATE TABLE cards ( id integer NOT NULL, name character varying(255), created_at timestamp without time zone NOT NULL, @@ -493,7 +501,7 @@ CREATE TABLE public.cards ( -- Name: cards_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.cards_id_seq +CREATE SEQUENCE cards_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -505,14 +513,14 @@ CREATE SEQUENCE public.cards_id_seq -- Name: cards_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.cards_id_seq OWNED BY public.cards.id; +ALTER SEQUENCE cards_id_seq OWNED BY cards.id; -- -- Name: charges; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.charges ( +CREATE TABLE charges ( id integer NOT NULL, amount integer, stripe_charge_id character varying(255), @@ -537,7 +545,7 @@ CREATE TABLE public.charges ( -- Name: charges_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.charges_id_seq +CREATE SEQUENCE charges_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -549,14 +557,14 @@ CREATE SEQUENCE public.charges_id_seq -- Name: charges_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.charges_id_seq OWNED BY public.charges.id; +ALTER SEQUENCE charges_id_seq OWNED BY charges.id; -- -- Name: comments; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.comments ( +CREATE TABLE comments ( id integer NOT NULL, profile_id integer, body text, @@ -571,7 +579,7 @@ CREATE TABLE public.comments ( -- Name: comments_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.comments_id_seq +CREATE SEQUENCE comments_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -583,14 +591,14 @@ CREATE SEQUENCE public.comments_id_seq -- Name: comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.comments_id_seq OWNED BY public.comments.id; +ALTER SEQUENCE comments_id_seq OWNED BY comments.id; -- -- Name: custom_field_joins; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.custom_field_joins ( +CREATE TABLE custom_field_joins ( id integer NOT NULL, custom_field_master_id integer, supporter_id integer, @@ -604,7 +612,7 @@ CREATE TABLE public.custom_field_joins ( -- Name: custom_field_joins_backup; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.custom_field_joins_backup ( +CREATE TABLE custom_field_joins_backup ( id integer NOT NULL, custom_field_master_id integer, supporter_id integer, @@ -619,7 +627,7 @@ CREATE TABLE public.custom_field_joins_backup ( -- Name: custom_field_joins_backup_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.custom_field_joins_backup_id_seq +CREATE SEQUENCE custom_field_joins_backup_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -631,14 +639,14 @@ CREATE SEQUENCE public.custom_field_joins_backup_id_seq -- Name: custom_field_joins_backup_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.custom_field_joins_backup_id_seq OWNED BY public.custom_field_joins_backup.id; +ALTER SEQUENCE custom_field_joins_backup_id_seq OWNED BY custom_field_joins_backup.id; -- -- Name: custom_field_joins_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.custom_field_joins_id_seq +CREATE SEQUENCE custom_field_joins_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -650,14 +658,14 @@ CREATE SEQUENCE public.custom_field_joins_id_seq -- Name: custom_field_joins_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.custom_field_joins_id_seq OWNED BY public.custom_field_joins.id; +ALTER SEQUENCE custom_field_joins_id_seq OWNED BY custom_field_joins.id; -- -- Name: custom_field_masters; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.custom_field_masters ( +CREATE TABLE custom_field_masters ( id integer NOT NULL, name character varying(255), nonprofit_id integer, @@ -671,7 +679,7 @@ CREATE TABLE public.custom_field_masters ( -- Name: custom_field_masters_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.custom_field_masters_id_seq +CREATE SEQUENCE custom_field_masters_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -683,14 +691,14 @@ CREATE SEQUENCE public.custom_field_masters_id_seq -- Name: custom_field_masters_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.custom_field_masters_id_seq OWNED BY public.custom_field_masters.id; +ALTER SEQUENCE custom_field_masters_id_seq OWNED BY custom_field_masters.id; -- -- Name: delayed_jobs; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.delayed_jobs ( +CREATE TABLE delayed_jobs ( id integer NOT NULL, priority integer DEFAULT 0 NOT NULL, attempts integer DEFAULT 0 NOT NULL, @@ -710,7 +718,7 @@ CREATE TABLE public.delayed_jobs ( -- Name: delayed_jobs_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.delayed_jobs_id_seq +CREATE SEQUENCE delayed_jobs_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -722,14 +730,14 @@ CREATE SEQUENCE public.delayed_jobs_id_seq -- Name: delayed_jobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.delayed_jobs_id_seq OWNED BY public.delayed_jobs.id; +ALTER SEQUENCE delayed_jobs_id_seq OWNED BY delayed_jobs.id; -- -- Name: direct_debit_details; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.direct_debit_details ( +CREATE TABLE direct_debit_details ( id integer NOT NULL, iban character varying(255), account_holder_name character varying(255), @@ -744,7 +752,7 @@ CREATE TABLE public.direct_debit_details ( -- Name: direct_debit_details_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.direct_debit_details_id_seq +CREATE SEQUENCE direct_debit_details_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -756,14 +764,14 @@ CREATE SEQUENCE public.direct_debit_details_id_seq -- Name: direct_debit_details_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.direct_debit_details_id_seq OWNED BY public.direct_debit_details.id; +ALTER SEQUENCE direct_debit_details_id_seq OWNED BY direct_debit_details.id; -- -- Name: disputes; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.disputes ( +CREATE TABLE disputes ( id integer NOT NULL, gross_amount integer, charge_id integer, @@ -780,7 +788,7 @@ CREATE TABLE public.disputes ( -- Name: disputes_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.disputes_id_seq +CREATE SEQUENCE disputes_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -792,14 +800,14 @@ CREATE SEQUENCE public.disputes_id_seq -- Name: disputes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.disputes_id_seq OWNED BY public.disputes.id; +ALTER SEQUENCE disputes_id_seq OWNED BY disputes.id; -- -- Name: donations; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.donations ( +CREATE TABLE donations ( id integer NOT NULL, amount integer, profile_id integer, @@ -834,7 +842,7 @@ CREATE TABLE public.donations ( -- Name: donations_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.donations_id_seq +CREATE SEQUENCE donations_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -846,14 +854,14 @@ CREATE SEQUENCE public.donations_id_seq -- Name: donations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.donations_id_seq OWNED BY public.donations.id; +ALTER SEQUENCE donations_id_seq OWNED BY donations.id; -- -- Name: donations_payment_imports; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.donations_payment_imports ( +CREATE TABLE donations_payment_imports ( donation_id integer, payment_import_id integer ); @@ -863,7 +871,7 @@ CREATE TABLE public.donations_payment_imports ( -- Name: email_lists; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.email_lists ( +CREATE TABLE email_lists ( id integer NOT NULL, nonprofit_id integer NOT NULL, tag_master_id integer NOT NULL, @@ -878,7 +886,7 @@ CREATE TABLE public.email_lists ( -- Name: email_lists_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.email_lists_id_seq +CREATE SEQUENCE email_lists_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -890,14 +898,14 @@ CREATE SEQUENCE public.email_lists_id_seq -- Name: email_lists_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.email_lists_id_seq OWNED BY public.email_lists.id; +ALTER SEQUENCE email_lists_id_seq OWNED BY email_lists.id; -- -- Name: email_settings; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.email_settings ( +CREATE TABLE email_settings ( id integer NOT NULL, user_id integer, nonprofit_id integer, @@ -913,7 +921,7 @@ CREATE TABLE public.email_settings ( -- Name: email_settings_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.email_settings_id_seq +CREATE SEQUENCE email_settings_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -925,14 +933,14 @@ CREATE SEQUENCE public.email_settings_id_seq -- Name: email_settings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.email_settings_id_seq OWNED BY public.email_settings.id; +ALTER SEQUENCE email_settings_id_seq OWNED BY email_settings.id; -- -- Name: event_discounts; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.event_discounts ( +CREATE TABLE event_discounts ( id integer NOT NULL, name character varying(255), code character varying(255), @@ -947,7 +955,7 @@ CREATE TABLE public.event_discounts ( -- Name: event_discounts_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.event_discounts_id_seq +CREATE SEQUENCE event_discounts_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -959,14 +967,14 @@ CREATE SEQUENCE public.event_discounts_id_seq -- Name: event_discounts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.event_discounts_id_seq OWNED BY public.event_discounts.id; +ALTER SEQUENCE event_discounts_id_seq OWNED BY event_discounts.id; -- -- Name: events; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.events ( +CREATE TABLE events ( id integer NOT NULL, name character varying(255), tagline character varying(255), @@ -1006,7 +1014,7 @@ CREATE TABLE public.events ( -- Name: events_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.events_id_seq +CREATE SEQUENCE events_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1018,14 +1026,14 @@ CREATE SEQUENCE public.events_id_seq -- Name: events_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.events_id_seq OWNED BY public.events.id; +ALTER SEQUENCE events_id_seq OWNED BY events.id; -- -- Name: exports; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.exports ( +CREATE TABLE exports ( id integer NOT NULL, user_id integer, nonprofit_id integer, @@ -1044,7 +1052,7 @@ CREATE TABLE public.exports ( -- Name: exports_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.exports_id_seq +CREATE SEQUENCE exports_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1056,14 +1064,14 @@ CREATE SEQUENCE public.exports_id_seq -- Name: exports_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.exports_id_seq OWNED BY public.exports.id; +ALTER SEQUENCE exports_id_seq OWNED BY exports.id; -- -- Name: full_contact_infos; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.full_contact_infos ( +CREATE TABLE full_contact_infos ( id integer NOT NULL, email character varying(255), full_name character varying(255), @@ -1087,7 +1095,7 @@ CREATE TABLE public.full_contact_infos ( -- Name: full_contact_infos_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.full_contact_infos_id_seq +CREATE SEQUENCE full_contact_infos_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1099,14 +1107,14 @@ CREATE SEQUENCE public.full_contact_infos_id_seq -- Name: full_contact_infos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.full_contact_infos_id_seq OWNED BY public.full_contact_infos.id; +ALTER SEQUENCE full_contact_infos_id_seq OWNED BY full_contact_infos.id; -- -- Name: full_contact_jobs; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.full_contact_jobs ( +CREATE TABLE full_contact_jobs ( id integer NOT NULL, supporter_id integer ); @@ -1116,7 +1124,7 @@ CREATE TABLE public.full_contact_jobs ( -- Name: full_contact_jobs_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.full_contact_jobs_id_seq +CREATE SEQUENCE full_contact_jobs_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1128,14 +1136,14 @@ CREATE SEQUENCE public.full_contact_jobs_id_seq -- Name: full_contact_jobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.full_contact_jobs_id_seq OWNED BY public.full_contact_jobs.id; +ALTER SEQUENCE full_contact_jobs_id_seq OWNED BY full_contact_jobs.id; -- -- Name: full_contact_orgs; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.full_contact_orgs ( +CREATE TABLE full_contact_orgs ( id integer NOT NULL, is_primary boolean, name character varying(255), @@ -1153,7 +1161,7 @@ CREATE TABLE public.full_contact_orgs ( -- Name: full_contact_orgs_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.full_contact_orgs_id_seq +CREATE SEQUENCE full_contact_orgs_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1165,14 +1173,14 @@ CREATE SEQUENCE public.full_contact_orgs_id_seq -- Name: full_contact_orgs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.full_contact_orgs_id_seq OWNED BY public.full_contact_orgs.id; +ALTER SEQUENCE full_contact_orgs_id_seq OWNED BY full_contact_orgs.id; -- -- Name: full_contact_photos; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.full_contact_photos ( +CREATE TABLE full_contact_photos ( id integer NOT NULL, full_contact_info_id integer, type_id character varying(255), @@ -1187,7 +1195,7 @@ CREATE TABLE public.full_contact_photos ( -- Name: full_contact_photos_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.full_contact_photos_id_seq +CREATE SEQUENCE full_contact_photos_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1199,14 +1207,14 @@ CREATE SEQUENCE public.full_contact_photos_id_seq -- Name: full_contact_photos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.full_contact_photos_id_seq OWNED BY public.full_contact_photos.id; +ALTER SEQUENCE full_contact_photos_id_seq OWNED BY full_contact_photos.id; -- -- Name: full_contact_social_profiles; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.full_contact_social_profiles ( +CREATE TABLE full_contact_social_profiles ( id integer NOT NULL, full_contact_info_id integer, type_id character varying(255), @@ -1225,7 +1233,7 @@ CREATE TABLE public.full_contact_social_profiles ( -- Name: full_contact_social_profiles_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.full_contact_social_profiles_id_seq +CREATE SEQUENCE full_contact_social_profiles_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1237,14 +1245,14 @@ CREATE SEQUENCE public.full_contact_social_profiles_id_seq -- Name: full_contact_social_profiles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.full_contact_social_profiles_id_seq OWNED BY public.full_contact_social_profiles.id; +ALTER SEQUENCE full_contact_social_profiles_id_seq OWNED BY full_contact_social_profiles.id; -- -- Name: full_contact_topics; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.full_contact_topics ( +CREATE TABLE full_contact_topics ( id integer NOT NULL, provider character varying(255), value character varying(255), @@ -1258,7 +1266,7 @@ CREATE TABLE public.full_contact_topics ( -- Name: full_contact_topics_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.full_contact_topics_id_seq +CREATE SEQUENCE full_contact_topics_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1270,14 +1278,14 @@ CREATE SEQUENCE public.full_contact_topics_id_seq -- Name: full_contact_topics_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.full_contact_topics_id_seq OWNED BY public.full_contact_topics.id; +ALTER SEQUENCE full_contact_topics_id_seq OWNED BY full_contact_topics.id; -- -- Name: image_attachments; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.image_attachments ( +CREATE TABLE image_attachments ( id integer NOT NULL, file character varying(255), parent_id integer, @@ -1291,7 +1299,7 @@ CREATE TABLE public.image_attachments ( -- Name: image_attachments_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.image_attachments_id_seq +CREATE SEQUENCE image_attachments_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1303,14 +1311,14 @@ CREATE SEQUENCE public.image_attachments_id_seq -- Name: image_attachments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.image_attachments_id_seq OWNED BY public.image_attachments.id; +ALTER SEQUENCE image_attachments_id_seq OWNED BY image_attachments.id; -- -- Name: imports; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.imports ( +CREATE TABLE imports ( id integer NOT NULL, row_count integer, date timestamp without time zone, @@ -1326,7 +1334,7 @@ CREATE TABLE public.imports ( -- Name: imports_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.imports_id_seq +CREATE SEQUENCE imports_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1338,14 +1346,14 @@ CREATE SEQUENCE public.imports_id_seq -- Name: imports_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.imports_id_seq OWNED BY public.imports.id; +ALTER SEQUENCE imports_id_seq OWNED BY imports.id; -- -- Name: miscellaneous_np_infos; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.miscellaneous_np_infos ( +CREATE TABLE miscellaneous_np_infos ( id integer NOT NULL, donate_again_url character varying(255), nonprofit_id integer, @@ -1359,7 +1367,8 @@ CREATE TABLE public.miscellaneous_np_infos ( -- Name: miscellaneous_np_infos_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.miscellaneous_np_infos_id_seq +CREATE SEQUENCE miscellaneous_np_infos_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1371,14 +1380,14 @@ CREATE SEQUENCE public.miscellaneous_np_infos_id_seq -- Name: miscellaneous_np_infos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.miscellaneous_np_infos_id_seq OWNED BY public.miscellaneous_np_infos.id; +ALTER SEQUENCE miscellaneous_np_infos_id_seq OWNED BY miscellaneous_np_infos.id; -- -- Name: nonprofit_keys; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.nonprofit_keys ( +CREATE TABLE nonprofit_keys ( id integer NOT NULL, nonprofit_id integer, mailchimp_token text, @@ -1391,7 +1400,7 @@ CREATE TABLE public.nonprofit_keys ( -- Name: nonprofit_keys_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.nonprofit_keys_id_seq +CREATE SEQUENCE nonprofit_keys_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1403,14 +1412,14 @@ CREATE SEQUENCE public.nonprofit_keys_id_seq -- Name: nonprofit_keys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.nonprofit_keys_id_seq OWNED BY public.nonprofit_keys.id; +ALTER SEQUENCE nonprofit_keys_id_seq OWNED BY nonprofit_keys.id; -- -- Name: nonprofits; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.nonprofits ( +CREATE TABLE nonprofits ( id integer NOT NULL, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, @@ -1461,7 +1470,7 @@ CREATE TABLE public.nonprofits ( card_failure_message_bottom text, fields_needed text, autocomplete_supporter_address boolean DEFAULT false, - currency character varying(255) DEFAULT 'usd'::character varying, + currency character varying(255) DEFAULT 'eur'::character varying, custom_layout character varying(255) ); @@ -1470,7 +1479,7 @@ CREATE TABLE public.nonprofits ( -- Name: nonprofits_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.nonprofits_id_seq +CREATE SEQUENCE nonprofits_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1482,14 +1491,14 @@ CREATE SEQUENCE public.nonprofits_id_seq -- Name: nonprofits_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.nonprofits_id_seq OWNED BY public.nonprofits.id; +ALTER SEQUENCE nonprofits_id_seq OWNED BY nonprofits.id; -- -- Name: offsite_payments; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.offsite_payments ( +CREATE TABLE offsite_payments ( id integer NOT NULL, gross_amount integer, kind character varying(255), @@ -1509,7 +1518,7 @@ CREATE TABLE public.offsite_payments ( -- Name: offsite_payments_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.offsite_payments_id_seq +CREATE SEQUENCE offsite_payments_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1521,14 +1530,14 @@ CREATE SEQUENCE public.offsite_payments_id_seq -- Name: offsite_payments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.offsite_payments_id_seq OWNED BY public.offsite_payments.id; +ALTER SEQUENCE offsite_payments_id_seq OWNED BY offsite_payments.id; -- -- Name: payment_imports; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.payment_imports ( +CREATE TABLE payment_imports ( id integer NOT NULL, user_id integer, nonprofit_id integer, @@ -1541,7 +1550,8 @@ CREATE TABLE public.payment_imports ( -- Name: payment_imports_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.payment_imports_id_seq +CREATE SEQUENCE payment_imports_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1553,14 +1563,14 @@ CREATE SEQUENCE public.payment_imports_id_seq -- Name: payment_imports_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.payment_imports_id_seq OWNED BY public.payment_imports.id; +ALTER SEQUENCE payment_imports_id_seq OWNED BY payment_imports.id; -- -- Name: payment_payouts; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.payment_payouts ( +CREATE TABLE payment_payouts ( id integer NOT NULL, donation_id integer, payout_id integer, @@ -1576,7 +1586,7 @@ CREATE TABLE public.payment_payouts ( -- Name: payment_payouts_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.payment_payouts_id_seq +CREATE SEQUENCE payment_payouts_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1588,14 +1598,14 @@ CREATE SEQUENCE public.payment_payouts_id_seq -- Name: payment_payouts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.payment_payouts_id_seq OWNED BY public.payment_payouts.id; +ALTER SEQUENCE payment_payouts_id_seq OWNED BY payment_payouts.id; -- -- Name: payments; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.payments ( +CREATE TABLE payments ( id integer NOT NULL, gross_amount integer, refund_total integer, @@ -1617,7 +1627,7 @@ CREATE TABLE public.payments ( -- Name: payments_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.payments_id_seq +CREATE SEQUENCE payments_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1629,14 +1639,14 @@ CREATE SEQUENCE public.payments_id_seq -- Name: payments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.payments_id_seq OWNED BY public.payments.id; +ALTER SEQUENCE payments_id_seq OWNED BY payments.id; -- -- Name: payouts; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.payouts ( +CREATE TABLE payouts ( id integer NOT NULL, net_amount integer, nonprofit_id integer, @@ -1661,7 +1671,7 @@ CREATE TABLE public.payouts ( -- Name: payouts_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.payouts_id_seq +CREATE SEQUENCE payouts_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1673,14 +1683,14 @@ CREATE SEQUENCE public.payouts_id_seq -- Name: payouts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.payouts_id_seq OWNED BY public.payouts.id; +ALTER SEQUENCE payouts_id_seq OWNED BY payouts.id; -- -- Name: profiles; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.profiles ( +CREATE TABLE profiles ( id integer NOT NULL, name character varying(255), created_at timestamp without time zone NOT NULL, @@ -1707,7 +1717,7 @@ CREATE TABLE public.profiles ( -- Name: profiles_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.profiles_id_seq +CREATE SEQUENCE profiles_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1719,14 +1729,14 @@ CREATE SEQUENCE public.profiles_id_seq -- Name: profiles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.profiles_id_seq OWNED BY public.profiles.id; +ALTER SEQUENCE profiles_id_seq OWNED BY profiles.id; -- -- Name: recurring_donations; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.recurring_donations ( +CREATE TABLE recurring_donations ( id integer NOT NULL, active boolean, paydate integer, @@ -1758,7 +1768,7 @@ CREATE TABLE public.recurring_donations ( -- Name: recurring_donations_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.recurring_donations_id_seq +CREATE SEQUENCE recurring_donations_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1770,14 +1780,14 @@ CREATE SEQUENCE public.recurring_donations_id_seq -- Name: recurring_donations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.recurring_donations_id_seq OWNED BY public.recurring_donations.id; +ALTER SEQUENCE recurring_donations_id_seq OWNED BY recurring_donations.id; -- -- Name: refunds; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.refunds ( +CREATE TABLE refunds ( id integer NOT NULL, amount integer, comment text, @@ -1796,7 +1806,7 @@ CREATE TABLE public.refunds ( -- Name: refunds_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.refunds_id_seq +CREATE SEQUENCE refunds_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1808,14 +1818,14 @@ CREATE SEQUENCE public.refunds_id_seq -- Name: refunds_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.refunds_id_seq OWNED BY public.refunds.id; +ALTER SEQUENCE refunds_id_seq OWNED BY refunds.id; -- -- Name: roles; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.roles ( +CREATE TABLE roles ( id integer NOT NULL, name character varying(255), user_id integer, @@ -1830,7 +1840,7 @@ CREATE TABLE public.roles ( -- Name: roles_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.roles_id_seq +CREATE SEQUENCE roles_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1842,14 +1852,14 @@ CREATE SEQUENCE public.roles_id_seq -- Name: roles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.roles_id_seq OWNED BY public.roles.id; +ALTER SEQUENCE roles_id_seq OWNED BY roles.id; -- -- Name: schema_migrations; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.schema_migrations ( +CREATE TABLE schema_migrations ( version character varying(255) NOT NULL ); @@ -1858,7 +1868,7 @@ CREATE TABLE public.schema_migrations ( -- Name: sessions; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.sessions ( +CREATE TABLE sessions ( id integer NOT NULL, session_id character varying(255) NOT NULL, data text, @@ -1871,7 +1881,7 @@ CREATE TABLE public.sessions ( -- Name: sessions_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.sessions_id_seq +CREATE SEQUENCE sessions_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1883,14 +1893,14 @@ CREATE SEQUENCE public.sessions_id_seq -- Name: sessions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.sessions_id_seq OWNED BY public.sessions.id; +ALTER SEQUENCE sessions_id_seq OWNED BY sessions.id; -- -- Name: source_tokens; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.source_tokens ( +CREATE TABLE source_tokens ( token uuid NOT NULL, expiration timestamp without time zone, tokenizable_id integer, @@ -1907,7 +1917,7 @@ CREATE TABLE public.source_tokens ( -- Name: supporter_emails; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.supporter_emails ( +CREATE TABLE supporter_emails ( id integer NOT NULL, "to" text, "from" character varying(255), @@ -1927,7 +1937,7 @@ CREATE TABLE public.supporter_emails ( -- Name: supporter_emails_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.supporter_emails_id_seq +CREATE SEQUENCE supporter_emails_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1939,14 +1949,14 @@ CREATE SEQUENCE public.supporter_emails_id_seq -- Name: supporter_emails_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.supporter_emails_id_seq OWNED BY public.supporter_emails.id; +ALTER SEQUENCE supporter_emails_id_seq OWNED BY supporter_emails.id; -- -- Name: supporter_notes; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.supporter_notes ( +CREATE TABLE supporter_notes ( id integer NOT NULL, content text, supporter_id integer, @@ -1961,7 +1971,7 @@ CREATE TABLE public.supporter_notes ( -- Name: supporter_notes_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.supporter_notes_id_seq +CREATE SEQUENCE supporter_notes_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1973,14 +1983,14 @@ CREATE SEQUENCE public.supporter_notes_id_seq -- Name: supporter_notes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.supporter_notes_id_seq OWNED BY public.supporter_notes.id; +ALTER SEQUENCE supporter_notes_id_seq OWNED BY supporter_notes.id; -- -- Name: supporters; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.supporters ( +CREATE TABLE supporters ( id integer NOT NULL, profile_id integer, nonprofit_id integer, @@ -2020,7 +2030,7 @@ CREATE TABLE public.supporters ( -- Name: supporters_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.supporters_id_seq +CREATE SEQUENCE supporters_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2032,14 +2042,14 @@ CREATE SEQUENCE public.supporters_id_seq -- Name: supporters_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.supporters_id_seq OWNED BY public.supporters.id; +ALTER SEQUENCE supporters_id_seq OWNED BY supporters.id; -- -- Name: tag_joins; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.tag_joins ( +CREATE TABLE tag_joins ( id integer NOT NULL, tag_master_id integer, supporter_id integer, @@ -2052,7 +2062,7 @@ CREATE TABLE public.tag_joins ( -- Name: tag_joins_backup; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.tag_joins_backup ( +CREATE TABLE tag_joins_backup ( id integer NOT NULL, tag_master_id integer, supporter_id integer, @@ -2066,7 +2076,7 @@ CREATE TABLE public.tag_joins_backup ( -- Name: tag_joins_backup_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.tag_joins_backup_id_seq +CREATE SEQUENCE tag_joins_backup_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2078,14 +2088,14 @@ CREATE SEQUENCE public.tag_joins_backup_id_seq -- Name: tag_joins_backup_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.tag_joins_backup_id_seq OWNED BY public.tag_joins_backup.id; +ALTER SEQUENCE tag_joins_backup_id_seq OWNED BY tag_joins_backup.id; -- -- Name: tag_joins_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.tag_joins_id_seq +CREATE SEQUENCE tag_joins_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2097,14 +2107,14 @@ CREATE SEQUENCE public.tag_joins_id_seq -- Name: tag_joins_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.tag_joins_id_seq OWNED BY public.tag_joins.id; +ALTER SEQUENCE tag_joins_id_seq OWNED BY tag_joins.id; -- -- Name: tag_masters; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.tag_masters ( +CREATE TABLE tag_masters ( id integer NOT NULL, name character varying(255), nonprofit_id integer, @@ -2118,7 +2128,7 @@ CREATE TABLE public.tag_masters ( -- Name: tag_masters_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.tag_masters_id_seq +CREATE SEQUENCE tag_masters_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2130,14 +2140,14 @@ CREATE SEQUENCE public.tag_masters_id_seq -- Name: tag_masters_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.tag_masters_id_seq OWNED BY public.tag_masters.id; +ALTER SEQUENCE tag_masters_id_seq OWNED BY tag_masters.id; -- -- Name: ticket_levels; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.ticket_levels ( +CREATE TABLE ticket_levels ( id integer NOT NULL, event_id integer, amount integer, @@ -2158,7 +2168,7 @@ CREATE TABLE public.ticket_levels ( -- Name: ticket_levels_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.ticket_levels_id_seq +CREATE SEQUENCE ticket_levels_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2170,14 +2180,14 @@ CREATE SEQUENCE public.ticket_levels_id_seq -- Name: ticket_levels_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.ticket_levels_id_seq OWNED BY public.ticket_levels.id; +ALTER SEQUENCE ticket_levels_id_seq OWNED BY ticket_levels.id; -- -- Name: tickets; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.tickets ( +CREATE TABLE tickets ( id integer NOT NULL, ticket_level_id integer, charge_id integer, @@ -2202,7 +2212,7 @@ CREATE TABLE public.tickets ( -- Name: tickets_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.tickets_id_seq +CREATE SEQUENCE tickets_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2214,14 +2224,14 @@ CREATE SEQUENCE public.tickets_id_seq -- Name: tickets_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.tickets_id_seq OWNED BY public.tickets.id; +ALTER SEQUENCE tickets_id_seq OWNED BY tickets.id; -- -- Name: trackings; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.trackings ( +CREATE TABLE trackings ( id integer NOT NULL, utm_campaign character varying(255), utm_medium character varying(255), @@ -2237,7 +2247,7 @@ CREATE TABLE public.trackings ( -- Name: trackings_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.trackings_id_seq +CREATE SEQUENCE trackings_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2249,14 +2259,14 @@ CREATE SEQUENCE public.trackings_id_seq -- Name: trackings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.trackings_id_seq OWNED BY public.trackings.id; +ALTER SEQUENCE trackings_id_seq OWNED BY trackings.id; -- -- Name: users; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE public.users ( +CREATE TABLE users ( id integer NOT NULL, email character varying(255) DEFAULT ''::character varying NOT NULL, encrypted_password character varying(255) DEFAULT ''::character varying NOT NULL, @@ -2298,7 +2308,7 @@ CREATE TABLE public.users ( -- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE public.users_id_seq +CREATE SEQUENCE users_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2310,392 +2320,385 @@ CREATE SEQUENCE public.users_id_seq -- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id; +ALTER SEQUENCE users_id_seq OWNED BY users.id; -- -- Name: activities id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.activities ALTER COLUMN id SET DEFAULT nextval('public.activities_id_seq'::regclass); +ALTER TABLE ONLY activities ALTER COLUMN id SET DEFAULT nextval('activities_id_seq'::regclass); -- -- Name: bank_accounts id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.bank_accounts ALTER COLUMN id SET DEFAULT nextval('public.bank_accounts_id_seq'::regclass); +ALTER TABLE ONLY bank_accounts ALTER COLUMN id SET DEFAULT nextval('bank_accounts_id_seq'::regclass); -- -- Name: billing_plans id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.billing_plans ALTER COLUMN id SET DEFAULT nextval('public.billing_plans_id_seq'::regclass); +ALTER TABLE ONLY billing_plans ALTER COLUMN id SET DEFAULT nextval('billing_plans_id_seq'::regclass); -- -- Name: billing_subscriptions id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.billing_subscriptions ALTER COLUMN id SET DEFAULT nextval('public.billing_subscriptions_id_seq'::regclass); +ALTER TABLE ONLY billing_subscriptions ALTER COLUMN id SET DEFAULT nextval('billing_subscriptions_id_seq'::regclass); -- -- Name: campaign_gift_options id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.campaign_gift_options ALTER COLUMN id SET DEFAULT nextval('public.campaign_gift_options_id_seq'::regclass); +ALTER TABLE ONLY campaign_gift_options ALTER COLUMN id SET DEFAULT nextval('campaign_gift_options_id_seq'::regclass); -- -- Name: campaign_gifts id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.campaign_gifts ALTER COLUMN id SET DEFAULT nextval('public.campaign_gifts_id_seq'::regclass); +ALTER TABLE ONLY campaign_gifts ALTER COLUMN id SET DEFAULT nextval('campaign_gifts_id_seq'::regclass); -- -- Name: campaign_templates id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.campaign_templates ALTER COLUMN id SET DEFAULT nextval('public.campaign_templates_id_seq'::regclass); +ALTER TABLE ONLY campaign_templates ALTER COLUMN id SET DEFAULT nextval('campaign_templates_id_seq'::regclass); -- -- Name: campaigns id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.campaigns ALTER COLUMN id SET DEFAULT nextval('public.campaigns_id_seq'::regclass); +ALTER TABLE ONLY campaigns ALTER COLUMN id SET DEFAULT nextval('campaigns_id_seq'::regclass); -- -- Name: cards id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.cards ALTER COLUMN id SET DEFAULT nextval('public.cards_id_seq'::regclass); +ALTER TABLE ONLY cards ALTER COLUMN id SET DEFAULT nextval('cards_id_seq'::regclass); -- -- Name: charges id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.charges ALTER COLUMN id SET DEFAULT nextval('public.charges_id_seq'::regclass); +ALTER TABLE ONLY charges ALTER COLUMN id SET DEFAULT nextval('charges_id_seq'::regclass); -- -- Name: comments id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.comments ALTER COLUMN id SET DEFAULT nextval('public.comments_id_seq'::regclass); +ALTER TABLE ONLY comments ALTER COLUMN id SET DEFAULT nextval('comments_id_seq'::regclass); -- -- Name: custom_field_joins id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.custom_field_joins ALTER COLUMN id SET DEFAULT nextval('public.custom_field_joins_id_seq'::regclass); +ALTER TABLE ONLY custom_field_joins ALTER COLUMN id SET DEFAULT nextval('custom_field_joins_id_seq'::regclass); -- -- Name: custom_field_joins_backup id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.custom_field_joins_backup ALTER COLUMN id SET DEFAULT nextval('public.custom_field_joins_backup_id_seq'::regclass); +ALTER TABLE ONLY custom_field_joins_backup ALTER COLUMN id SET DEFAULT nextval('custom_field_joins_backup_id_seq'::regclass); -- -- Name: custom_field_masters id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.custom_field_masters ALTER COLUMN id SET DEFAULT nextval('public.custom_field_masters_id_seq'::regclass); +ALTER TABLE ONLY custom_field_masters ALTER COLUMN id SET DEFAULT nextval('custom_field_masters_id_seq'::regclass); -- -- Name: delayed_jobs id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.delayed_jobs ALTER COLUMN id SET DEFAULT nextval('public.delayed_jobs_id_seq'::regclass); +ALTER TABLE ONLY delayed_jobs ALTER COLUMN id SET DEFAULT nextval('delayed_jobs_id_seq'::regclass); -- -- Name: direct_debit_details id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.direct_debit_details ALTER COLUMN id SET DEFAULT nextval('public.direct_debit_details_id_seq'::regclass); +ALTER TABLE ONLY direct_debit_details ALTER COLUMN id SET DEFAULT nextval('direct_debit_details_id_seq'::regclass); -- -- Name: disputes id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.disputes ALTER COLUMN id SET DEFAULT nextval('public.disputes_id_seq'::regclass); +ALTER TABLE ONLY disputes ALTER COLUMN id SET DEFAULT nextval('disputes_id_seq'::regclass); -- -- Name: donations id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.donations ALTER COLUMN id SET DEFAULT nextval('public.donations_id_seq'::regclass); +ALTER TABLE ONLY donations ALTER COLUMN id SET DEFAULT nextval('donations_id_seq'::regclass); -- -- Name: email_lists id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.email_lists ALTER COLUMN id SET DEFAULT nextval('public.email_lists_id_seq'::regclass); +ALTER TABLE ONLY email_lists ALTER COLUMN id SET DEFAULT nextval('email_lists_id_seq'::regclass); -- -- Name: email_settings id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.email_settings ALTER COLUMN id SET DEFAULT nextval('public.email_settings_id_seq'::regclass); +ALTER TABLE ONLY email_settings ALTER COLUMN id SET DEFAULT nextval('email_settings_id_seq'::regclass); -- -- Name: event_discounts id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.event_discounts ALTER COLUMN id SET DEFAULT nextval('public.event_discounts_id_seq'::regclass); +ALTER TABLE ONLY event_discounts ALTER COLUMN id SET DEFAULT nextval('event_discounts_id_seq'::regclass); -- -- Name: events id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.events ALTER COLUMN id SET DEFAULT nextval('public.events_id_seq'::regclass); +ALTER TABLE ONLY events ALTER COLUMN id SET DEFAULT nextval('events_id_seq'::regclass); -- -- Name: exports id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.exports ALTER COLUMN id SET DEFAULT nextval('public.exports_id_seq'::regclass); +ALTER TABLE ONLY exports ALTER COLUMN id SET DEFAULT nextval('exports_id_seq'::regclass); -- -- Name: full_contact_infos id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.full_contact_infos ALTER COLUMN id SET DEFAULT nextval('public.full_contact_infos_id_seq'::regclass); +ALTER TABLE ONLY full_contact_infos ALTER COLUMN id SET DEFAULT nextval('full_contact_infos_id_seq'::regclass); -- -- Name: full_contact_jobs id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.full_contact_jobs ALTER COLUMN id SET DEFAULT nextval('public.full_contact_jobs_id_seq'::regclass); +ALTER TABLE ONLY full_contact_jobs ALTER COLUMN id SET DEFAULT nextval('full_contact_jobs_id_seq'::regclass); -- -- Name: full_contact_orgs id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.full_contact_orgs ALTER COLUMN id SET DEFAULT nextval('public.full_contact_orgs_id_seq'::regclass); +ALTER TABLE ONLY full_contact_orgs ALTER COLUMN id SET DEFAULT nextval('full_contact_orgs_id_seq'::regclass); -- -- Name: full_contact_photos id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.full_contact_photos ALTER COLUMN id SET DEFAULT nextval('public.full_contact_photos_id_seq'::regclass); +ALTER TABLE ONLY full_contact_photos ALTER COLUMN id SET DEFAULT nextval('full_contact_photos_id_seq'::regclass); -- -- Name: full_contact_social_profiles id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.full_contact_social_profiles ALTER COLUMN id SET DEFAULT nextval('public.full_contact_social_profiles_id_seq'::regclass); +ALTER TABLE ONLY full_contact_social_profiles ALTER COLUMN id SET DEFAULT nextval('full_contact_social_profiles_id_seq'::regclass); -- -- Name: full_contact_topics id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.full_contact_topics ALTER COLUMN id SET DEFAULT nextval('public.full_contact_topics_id_seq'::regclass); +ALTER TABLE ONLY full_contact_topics ALTER COLUMN id SET DEFAULT nextval('full_contact_topics_id_seq'::regclass); -- -- Name: image_attachments id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.image_attachments ALTER COLUMN id SET DEFAULT nextval('public.image_attachments_id_seq'::regclass); +ALTER TABLE ONLY image_attachments ALTER COLUMN id SET DEFAULT nextval('image_attachments_id_seq'::regclass); -- -- Name: imports id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.imports ALTER COLUMN id SET DEFAULT nextval('public.imports_id_seq'::regclass); +ALTER TABLE ONLY imports ALTER COLUMN id SET DEFAULT nextval('imports_id_seq'::regclass); -- -- Name: miscellaneous_np_infos id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.miscellaneous_np_infos ALTER COLUMN id SET DEFAULT nextval('public.miscellaneous_np_infos_id_seq'::regclass); +ALTER TABLE ONLY miscellaneous_np_infos ALTER COLUMN id SET DEFAULT nextval('miscellaneous_np_infos_id_seq'::regclass); -- -- Name: nonprofit_keys id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.nonprofit_keys ALTER COLUMN id SET DEFAULT nextval('public.nonprofit_keys_id_seq'::regclass); +ALTER TABLE ONLY nonprofit_keys ALTER COLUMN id SET DEFAULT nextval('nonprofit_keys_id_seq'::regclass); -- -- Name: nonprofits id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.nonprofits ALTER COLUMN id SET DEFAULT nextval('public.nonprofits_id_seq'::regclass); +ALTER TABLE ONLY nonprofits ALTER COLUMN id SET DEFAULT nextval('nonprofits_id_seq'::regclass); -- -- Name: offsite_payments id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.offsite_payments ALTER COLUMN id SET DEFAULT nextval('public.offsite_payments_id_seq'::regclass); +ALTER TABLE ONLY offsite_payments ALTER COLUMN id SET DEFAULT nextval('offsite_payments_id_seq'::regclass); -- -- Name: payment_imports id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.payment_imports ALTER COLUMN id SET DEFAULT nextval('public.payment_imports_id_seq'::regclass); +ALTER TABLE ONLY payment_imports ALTER COLUMN id SET DEFAULT nextval('payment_imports_id_seq'::regclass); -- -- Name: payment_payouts id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.payment_payouts ALTER COLUMN id SET DEFAULT nextval('public.payment_payouts_id_seq'::regclass); +ALTER TABLE ONLY payment_payouts ALTER COLUMN id SET DEFAULT nextval('payment_payouts_id_seq'::regclass); -- -- Name: payments id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.payments ALTER COLUMN id SET DEFAULT nextval('public.payments_id_seq'::regclass); +ALTER TABLE ONLY payments ALTER COLUMN id SET DEFAULT nextval('payments_id_seq'::regclass); -- -- Name: payouts id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.payouts ALTER COLUMN id SET DEFAULT nextval('public.payouts_id_seq'::regclass); +ALTER TABLE ONLY payouts ALTER COLUMN id SET DEFAULT nextval('payouts_id_seq'::regclass); -- -- Name: profiles id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.profiles ALTER COLUMN id SET DEFAULT nextval('public.profiles_id_seq'::regclass); +ALTER TABLE ONLY profiles ALTER COLUMN id SET DEFAULT nextval('profiles_id_seq'::regclass); -- -- Name: recurring_donations id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.recurring_donations ALTER COLUMN id SET DEFAULT nextval('public.recurring_donations_id_seq'::regclass); +ALTER TABLE ONLY recurring_donations ALTER COLUMN id SET DEFAULT nextval('recurring_donations_id_seq'::regclass); -- -- Name: refunds id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.refunds ALTER COLUMN id SET DEFAULT nextval('public.refunds_id_seq'::regclass); +ALTER TABLE ONLY refunds ALTER COLUMN id SET DEFAULT nextval('refunds_id_seq'::regclass); -- -- Name: roles id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.roles ALTER COLUMN id SET DEFAULT nextval('public.roles_id_seq'::regclass); +ALTER TABLE ONLY roles ALTER COLUMN id SET DEFAULT nextval('roles_id_seq'::regclass); -- -- Name: sessions id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.sessions ALTER COLUMN id SET DEFAULT nextval('public.sessions_id_seq'::regclass); +ALTER TABLE ONLY sessions ALTER COLUMN id SET DEFAULT nextval('sessions_id_seq'::regclass); -- -- Name: supporter_emails id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.supporter_emails ALTER COLUMN id SET DEFAULT nextval('public.supporter_emails_id_seq'::regclass); +ALTER TABLE ONLY supporter_emails ALTER COLUMN id SET DEFAULT nextval('supporter_emails_id_seq'::regclass); -- -- Name: supporter_notes id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.supporter_notes ALTER COLUMN id SET DEFAULT nextval('public.supporter_notes_id_seq'::regclass); +ALTER TABLE ONLY supporter_notes ALTER COLUMN id SET DEFAULT nextval('supporter_notes_id_seq'::regclass); -- -- Name: supporters id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.supporters ALTER COLUMN id SET DEFAULT nextval('public.supporters_id_seq'::regclass); +ALTER TABLE ONLY supporters ALTER COLUMN id SET DEFAULT nextval('supporters_id_seq'::regclass); -- -- Name: tag_joins id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.tag_joins ALTER COLUMN id SET DEFAULT nextval('public.tag_joins_id_seq'::regclass); +ALTER TABLE ONLY tag_joins ALTER COLUMN id SET DEFAULT nextval('tag_joins_id_seq'::regclass); -- -- Name: tag_joins_backup id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.tag_joins_backup ALTER COLUMN id SET DEFAULT nextval('public.tag_joins_backup_id_seq'::regclass); +ALTER TABLE ONLY tag_joins_backup ALTER COLUMN id SET DEFAULT nextval('tag_joins_backup_id_seq'::regclass); -- -- Name: tag_masters id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.tag_masters ALTER COLUMN id SET DEFAULT nextval('public.tag_masters_id_seq'::regclass); +ALTER TABLE ONLY tag_masters ALTER COLUMN id SET DEFAULT nextval('tag_masters_id_seq'::regclass); -- -- Name: ticket_levels id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.ticket_levels ALTER COLUMN id SET DEFAULT nextval('public.ticket_levels_id_seq'::regclass); +ALTER TABLE ONLY ticket_levels ALTER COLUMN id SET DEFAULT nextval('ticket_levels_id_seq'::regclass); -- -- Name: tickets id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.tickets ALTER COLUMN id SET DEFAULT nextval('public.tickets_id_seq'::regclass); - - --- --- Name: trackings id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.trackings ALTER COLUMN id SET DEFAULT nextval('public.trackings_id_seq'::regclass); +ALTER TABLE ONLY tickets ALTER COLUMN id SET DEFAULT nextval('tickets_id_seq'::regclass); -- -- Name: users id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass); +ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass); -- -- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.ar_internal_metadata +ALTER TABLE ONLY ar_internal_metadata ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key); @@ -2703,7 +2706,7 @@ ALTER TABLE ONLY public.ar_internal_metadata -- Name: billing_plans billing_plan_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.billing_plans +ALTER TABLE ONLY billing_plans ADD CONSTRAINT billing_plan_pkey PRIMARY KEY (id); @@ -2711,7 +2714,7 @@ ALTER TABLE ONLY public.billing_plans -- Name: billing_subscriptions billing_subscriptions_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.billing_subscriptions +ALTER TABLE ONLY billing_subscriptions ADD CONSTRAINT billing_subscriptions_pkey PRIMARY KEY (id); @@ -2719,7 +2722,7 @@ ALTER TABLE ONLY public.billing_subscriptions -- Name: activities campaign_activities_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.activities +ALTER TABLE ONLY activities ADD CONSTRAINT campaign_activities_pkey PRIMARY KEY (id); @@ -2727,7 +2730,7 @@ ALTER TABLE ONLY public.activities -- Name: comments campaign_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.comments +ALTER TABLE ONLY comments ADD CONSTRAINT campaign_comments_pkey PRIMARY KEY (id); @@ -2735,7 +2738,7 @@ ALTER TABLE ONLY public.comments -- Name: campaign_gift_options campaign_gift_options_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.campaign_gift_options +ALTER TABLE ONLY campaign_gift_options ADD CONSTRAINT campaign_gift_options_pkey PRIMARY KEY (id); @@ -2743,7 +2746,7 @@ ALTER TABLE ONLY public.campaign_gift_options -- Name: campaign_gifts campaign_gifts_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.campaign_gifts +ALTER TABLE ONLY campaign_gifts ADD CONSTRAINT campaign_gifts_pkey PRIMARY KEY (id); @@ -2751,7 +2754,7 @@ ALTER TABLE ONLY public.campaign_gifts -- Name: campaign_templates campaign_templates_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.campaign_templates +ALTER TABLE ONLY campaign_templates ADD CONSTRAINT campaign_templates_pkey PRIMARY KEY (id); @@ -2759,7 +2762,7 @@ ALTER TABLE ONLY public.campaign_templates -- Name: campaigns campaigns_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.campaigns +ALTER TABLE ONLY campaigns ADD CONSTRAINT campaigns_pkey PRIMARY KEY (id); @@ -2767,7 +2770,7 @@ ALTER TABLE ONLY public.campaigns -- Name: charges charges_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.charges +ALTER TABLE ONLY charges ADD CONSTRAINT charges_pkey PRIMARY KEY (id); @@ -2775,7 +2778,7 @@ ALTER TABLE ONLY public.charges -- Name: custom_field_joins_backup custom_field_joins_backup_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.custom_field_joins_backup +ALTER TABLE ONLY custom_field_joins_backup ADD CONSTRAINT custom_field_joins_backup_pkey PRIMARY KEY (id); @@ -2783,7 +2786,7 @@ ALTER TABLE ONLY public.custom_field_joins_backup -- Name: custom_field_joins custom_field_joins_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.custom_field_joins +ALTER TABLE ONLY custom_field_joins ADD CONSTRAINT custom_field_joins_pkey PRIMARY KEY (id); @@ -2791,7 +2794,7 @@ ALTER TABLE ONLY public.custom_field_joins -- Name: custom_field_masters custom_field_masters_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.custom_field_masters +ALTER TABLE ONLY custom_field_masters ADD CONSTRAINT custom_field_masters_pkey PRIMARY KEY (id); @@ -2799,7 +2802,7 @@ ALTER TABLE ONLY public.custom_field_masters -- Name: delayed_jobs delayed_jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.delayed_jobs +ALTER TABLE ONLY delayed_jobs ADD CONSTRAINT delayed_jobs_pkey PRIMARY KEY (id); @@ -2807,7 +2810,7 @@ ALTER TABLE ONLY public.delayed_jobs -- Name: direct_debit_details direct_debit_details_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.direct_debit_details +ALTER TABLE ONLY direct_debit_details ADD CONSTRAINT direct_debit_details_pkey PRIMARY KEY (id); @@ -2815,7 +2818,7 @@ ALTER TABLE ONLY public.direct_debit_details -- Name: disputes disputes_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.disputes +ALTER TABLE ONLY disputes ADD CONSTRAINT disputes_pkey PRIMARY KEY (id); @@ -2823,7 +2826,7 @@ ALTER TABLE ONLY public.disputes -- Name: payment_payouts donation_disbursals_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.payment_payouts +ALTER TABLE ONLY payment_payouts ADD CONSTRAINT donation_disbursals_pkey PRIMARY KEY (id); @@ -2831,7 +2834,7 @@ ALTER TABLE ONLY public.payment_payouts -- Name: donations donations_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.donations +ALTER TABLE ONLY donations ADD CONSTRAINT donations_pkey PRIMARY KEY (id); @@ -2839,7 +2842,7 @@ ALTER TABLE ONLY public.donations -- Name: profiles donor_profiles_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.profiles +ALTER TABLE ONLY profiles ADD CONSTRAINT donor_profiles_pkey PRIMARY KEY (id); @@ -2847,7 +2850,7 @@ ALTER TABLE ONLY public.profiles -- Name: email_settings email_settings_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.email_settings +ALTER TABLE ONLY email_settings ADD CONSTRAINT email_settings_pkey PRIMARY KEY (id); @@ -2855,7 +2858,7 @@ ALTER TABLE ONLY public.email_settings -- Name: event_discounts event_discounts_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.event_discounts +ALTER TABLE ONLY event_discounts ADD CONSTRAINT event_discounts_pkey PRIMARY KEY (id); @@ -2863,7 +2866,7 @@ ALTER TABLE ONLY public.event_discounts -- Name: events events_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.events +ALTER TABLE ONLY events ADD CONSTRAINT events_pkey PRIMARY KEY (id); @@ -2871,7 +2874,7 @@ ALTER TABLE ONLY public.events -- Name: exports exports_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.exports +ALTER TABLE ONLY exports ADD CONSTRAINT exports_pkey PRIMARY KEY (id); @@ -2879,7 +2882,7 @@ ALTER TABLE ONLY public.exports -- Name: full_contact_infos full_contact_infos_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.full_contact_infos +ALTER TABLE ONLY full_contact_infos ADD CONSTRAINT full_contact_infos_pkey PRIMARY KEY (id); @@ -2887,7 +2890,7 @@ ALTER TABLE ONLY public.full_contact_infos -- Name: full_contact_jobs full_contact_jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.full_contact_jobs +ALTER TABLE ONLY full_contact_jobs ADD CONSTRAINT full_contact_jobs_pkey PRIMARY KEY (id); @@ -2895,7 +2898,7 @@ ALTER TABLE ONLY public.full_contact_jobs -- Name: full_contact_orgs full_contact_orgs_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.full_contact_orgs +ALTER TABLE ONLY full_contact_orgs ADD CONSTRAINT full_contact_orgs_pkey PRIMARY KEY (id); @@ -2903,7 +2906,7 @@ ALTER TABLE ONLY public.full_contact_orgs -- Name: full_contact_photos full_contact_photos_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.full_contact_photos +ALTER TABLE ONLY full_contact_photos ADD CONSTRAINT full_contact_photos_pkey PRIMARY KEY (id); @@ -2911,7 +2914,7 @@ ALTER TABLE ONLY public.full_contact_photos -- Name: full_contact_social_profiles full_contact_social_profiles_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.full_contact_social_profiles +ALTER TABLE ONLY full_contact_social_profiles ADD CONSTRAINT full_contact_social_profiles_pkey PRIMARY KEY (id); @@ -2919,7 +2922,7 @@ ALTER TABLE ONLY public.full_contact_social_profiles -- Name: full_contact_topics full_contact_topics_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.full_contact_topics +ALTER TABLE ONLY full_contact_topics ADD CONSTRAINT full_contact_topics_pkey PRIMARY KEY (id); @@ -2927,7 +2930,7 @@ ALTER TABLE ONLY public.full_contact_topics -- Name: image_attachments image_attachments_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.image_attachments +ALTER TABLE ONLY image_attachments ADD CONSTRAINT image_attachments_pkey PRIMARY KEY (id); @@ -2935,7 +2938,7 @@ ALTER TABLE ONLY public.image_attachments -- Name: imports imports_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.imports +ALTER TABLE ONLY imports ADD CONSTRAINT imports_pkey PRIMARY KEY (id); @@ -2943,7 +2946,7 @@ ALTER TABLE ONLY public.imports -- Name: email_lists mailchimp_email_lists_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.email_lists +ALTER TABLE ONLY email_lists ADD CONSTRAINT mailchimp_email_lists_pkey PRIMARY KEY (id); @@ -2951,7 +2954,7 @@ ALTER TABLE ONLY public.email_lists -- Name: miscellaneous_np_infos miscellaneous_np_infos_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.miscellaneous_np_infos +ALTER TABLE ONLY miscellaneous_np_infos ADD CONSTRAINT miscellaneous_np_infos_pkey PRIMARY KEY (id); @@ -2959,7 +2962,7 @@ ALTER TABLE ONLY public.miscellaneous_np_infos -- Name: bank_accounts nonprofit_bank_accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.bank_accounts +ALTER TABLE ONLY bank_accounts ADD CONSTRAINT nonprofit_bank_accounts_pkey PRIMARY KEY (id); @@ -2967,7 +2970,7 @@ ALTER TABLE ONLY public.bank_accounts -- Name: payouts nonprofit_credits_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.payouts +ALTER TABLE ONLY payouts ADD CONSTRAINT nonprofit_credits_pkey PRIMARY KEY (id); @@ -2975,7 +2978,7 @@ ALTER TABLE ONLY public.payouts -- Name: nonprofit_keys nonprofit_keys_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.nonprofit_keys +ALTER TABLE ONLY nonprofit_keys ADD CONSTRAINT nonprofit_keys_pkey PRIMARY KEY (id); @@ -2983,7 +2986,7 @@ ALTER TABLE ONLY public.nonprofit_keys -- Name: nonprofits npos_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.nonprofits +ALTER TABLE ONLY nonprofits ADD CONSTRAINT npos_pkey PRIMARY KEY (id); @@ -2991,7 +2994,7 @@ ALTER TABLE ONLY public.nonprofits -- Name: offsite_payments offsite_payments_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.offsite_payments +ALTER TABLE ONLY offsite_payments ADD CONSTRAINT offsite_payments_pkey PRIMARY KEY (id); @@ -2999,7 +3002,7 @@ ALTER TABLE ONLY public.offsite_payments -- Name: payment_imports payment_imports_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.payment_imports +ALTER TABLE ONLY payment_imports ADD CONSTRAINT payment_imports_pkey PRIMARY KEY (id); @@ -3007,7 +3010,7 @@ ALTER TABLE ONLY public.payment_imports -- Name: cards payment_methods_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.cards +ALTER TABLE ONLY cards ADD CONSTRAINT payment_methods_pkey PRIMARY KEY (id); @@ -3015,7 +3018,7 @@ ALTER TABLE ONLY public.cards -- Name: payments payments_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.payments +ALTER TABLE ONLY payments ADD CONSTRAINT payments_pkey PRIMARY KEY (id); @@ -3023,7 +3026,7 @@ ALTER TABLE ONLY public.payments -- Name: recurring_donations recurring_donations_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.recurring_donations +ALTER TABLE ONLY recurring_donations ADD CONSTRAINT recurring_donations_pkey PRIMARY KEY (id); @@ -3031,7 +3034,7 @@ ALTER TABLE ONLY public.recurring_donations -- Name: refunds refunds_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.refunds +ALTER TABLE ONLY refunds ADD CONSTRAINT refunds_pkey PRIMARY KEY (id); @@ -3039,7 +3042,7 @@ ALTER TABLE ONLY public.refunds -- Name: roles roles_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.roles +ALTER TABLE ONLY roles ADD CONSTRAINT roles_pkey PRIMARY KEY (id); @@ -3047,7 +3050,7 @@ ALTER TABLE ONLY public.roles -- Name: sessions sessions_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.sessions +ALTER TABLE ONLY sessions ADD CONSTRAINT sessions_pkey PRIMARY KEY (id); @@ -3055,7 +3058,7 @@ ALTER TABLE ONLY public.sessions -- Name: supporters supporter_data_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.supporters +ALTER TABLE ONLY supporters ADD CONSTRAINT supporter_data_pkey PRIMARY KEY (id); @@ -3063,7 +3066,7 @@ ALTER TABLE ONLY public.supporters -- Name: supporter_emails supporter_emails_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.supporter_emails +ALTER TABLE ONLY supporter_emails ADD CONSTRAINT supporter_emails_pkey PRIMARY KEY (id); @@ -3071,7 +3074,7 @@ ALTER TABLE ONLY public.supporter_emails -- Name: supporter_notes supporter_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.supporter_notes +ALTER TABLE ONLY supporter_notes ADD CONSTRAINT supporter_notes_pkey PRIMARY KEY (id); @@ -3079,7 +3082,7 @@ ALTER TABLE ONLY public.supporter_notes -- Name: tag_joins_backup tag_joins_backup_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.tag_joins_backup +ALTER TABLE ONLY tag_joins_backup ADD CONSTRAINT tag_joins_backup_pkey PRIMARY KEY (id); @@ -3087,7 +3090,7 @@ ALTER TABLE ONLY public.tag_joins_backup -- Name: tag_joins tag_joins_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.tag_joins +ALTER TABLE ONLY tag_joins ADD CONSTRAINT tag_joins_pkey PRIMARY KEY (id); @@ -3095,7 +3098,7 @@ ALTER TABLE ONLY public.tag_joins -- Name: tag_masters tag_masters_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.tag_masters +ALTER TABLE ONLY tag_masters ADD CONSTRAINT tag_masters_pkey PRIMARY KEY (id); @@ -3103,7 +3106,7 @@ ALTER TABLE ONLY public.tag_masters -- Name: ticket_levels ticket_levels_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.ticket_levels +ALTER TABLE ONLY ticket_levels ADD CONSTRAINT ticket_levels_pkey PRIMARY KEY (id); @@ -3111,7 +3114,7 @@ ALTER TABLE ONLY public.ticket_levels -- Name: tickets tickets_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.tickets +ALTER TABLE ONLY tickets ADD CONSTRAINT tickets_pkey PRIMARY KEY (id); @@ -3119,7 +3122,7 @@ ALTER TABLE ONLY public.tickets -- Name: trackings trackings_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.trackings +ALTER TABLE ONLY trackings ADD CONSTRAINT trackings_pkey PRIMARY KEY (id); @@ -3127,7 +3130,7 @@ ALTER TABLE ONLY public.trackings -- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY public.users +ALTER TABLE ONLY users ADD CONSTRAINT users_pkey PRIMARY KEY (id); @@ -3135,91 +3138,91 @@ ALTER TABLE ONLY public.users -- Name: custom_field_join_supporter_unique_idx; Type: INDEX; Schema: public; Owner: - -- -CREATE UNIQUE INDEX custom_field_join_supporter_unique_idx ON public.custom_field_joins USING btree (custom_field_master_id, supporter_id); +CREATE UNIQUE INDEX custom_field_join_supporter_unique_idx ON custom_field_joins USING btree (custom_field_master_id, supporter_id); -- -- Name: custom_field_joins_custom_field_master_id; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX custom_field_joins_custom_field_master_id ON public.custom_field_joins USING btree (custom_field_master_id); +CREATE INDEX custom_field_joins_custom_field_master_id ON custom_field_joins USING btree (custom_field_master_id); -- -- Name: delayed_jobs_priority; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX delayed_jobs_priority ON public.delayed_jobs USING btree (priority, run_at); +CREATE INDEX delayed_jobs_priority ON delayed_jobs USING btree (priority, run_at); -- -- Name: donations_amount; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX donations_amount ON public.donations USING btree (amount); +CREATE INDEX donations_amount ON donations USING btree (amount); -- -- Name: donations_campaign_id; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX donations_campaign_id ON public.donations USING btree (campaign_id); +CREATE INDEX donations_campaign_id ON donations USING btree (campaign_id); -- -- Name: donations_designation; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX donations_designation ON public.donations USING btree (lower(designation)); +CREATE INDEX donations_designation ON donations USING btree (lower(designation)); -- -- Name: donations_event_id; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX donations_event_id ON public.donations USING btree (event_id); +CREATE INDEX donations_event_id ON donations USING btree (event_id); -- -- Name: donations_supporter_id; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX donations_supporter_id ON public.donations USING btree (supporter_id); +CREATE INDEX donations_supporter_id ON donations USING btree (supporter_id); -- -- Name: index_activities_on_nonprofit_id; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX index_activities_on_nonprofit_id ON public.activities USING btree (nonprofit_id); +CREATE INDEX index_activities_on_nonprofit_id ON activities USING btree (nonprofit_id); -- -- Name: index_activities_on_supporter_id; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX index_activities_on_supporter_id ON public.activities USING btree (supporter_id); +CREATE INDEX index_activities_on_supporter_id ON activities USING btree (supporter_id); -- -- Name: index_campaign_gifts_on_campaign_gift_option_id; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX index_campaign_gifts_on_campaign_gift_option_id ON public.campaign_gifts USING btree (campaign_gift_option_id); +CREATE INDEX index_campaign_gifts_on_campaign_gift_option_id ON campaign_gifts USING btree (campaign_gift_option_id); -- -- Name: index_cards_on_id_and_holder_type_and_holder_id_and_inactive; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX index_cards_on_id_and_holder_type_and_holder_id_and_inactive ON public.cards USING btree (id, holder_type, holder_id, inactive); +CREATE INDEX index_cards_on_id_and_holder_type_and_holder_id_and_inactive ON cards USING btree (id, holder_type, holder_id, inactive); -- -- Name: index_charges_on_payment_id; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX index_charges_on_payment_id ON public.charges USING btree (payment_id); +CREATE INDEX index_charges_on_payment_id ON charges USING btree (payment_id); -- @@ -3233,14 +3236,14 @@ CREATE INDEX index_donations_on_event_id ON public.donations USING btree (event_ -- Name: index_exports_on_nonprofit_id; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX index_exports_on_nonprofit_id ON public.exports USING btree (nonprofit_id); +CREATE INDEX index_exports_on_nonprofit_id ON exports USING btree (nonprofit_id); -- -- Name: index_exports_on_user_id; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX index_exports_on_user_id ON public.exports USING btree (user_id); +CREATE INDEX index_exports_on_user_id ON exports USING btree (user_id); -- @@ -3261,35 +3264,35 @@ CREATE INDEX index_refunds_on_payment_id ON public.refunds USING btree (payment_ -- Name: index_sessions_on_session_id; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX index_sessions_on_session_id ON public.sessions USING btree (session_id); +CREATE INDEX index_sessions_on_session_id ON sessions USING btree (session_id); -- -- Name: index_sessions_on_updated_at; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX index_sessions_on_updated_at ON public.sessions USING btree (updated_at); +CREATE INDEX index_sessions_on_updated_at ON sessions USING btree (updated_at); -- -- Name: index_source_tokens_on_expiration; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX index_source_tokens_on_expiration ON public.source_tokens USING btree (expiration); +CREATE INDEX index_source_tokens_on_expiration ON source_tokens USING btree (expiration); -- -- Name: index_source_tokens_on_token; Type: INDEX; Schema: public; Owner: - -- -CREATE UNIQUE INDEX index_source_tokens_on_token ON public.source_tokens USING btree (token); +CREATE UNIQUE INDEX index_source_tokens_on_token ON source_tokens USING btree (token); -- -- Name: index_source_tokens_on_tokenizable_id_and_tokenizable_type; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX index_source_tokens_on_tokenizable_id_and_tokenizable_type ON public.source_tokens USING btree (tokenizable_id, tokenizable_type); +CREATE INDEX index_source_tokens_on_tokenizable_id_and_tokenizable_type ON source_tokens USING btree (tokenizable_id, tokenizable_type); -- @@ -3303,21 +3306,21 @@ CREATE INDEX index_supporter_notes_on_supporter_id ON public.supporter_notes USI -- Name: index_supporters_on_deleted; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX index_supporters_on_deleted ON public.supporters USING btree (deleted); +CREATE INDEX index_supporters_on_deleted ON supporters USING btree (deleted); -- -- Name: index_supporters_on_import_id; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX index_supporters_on_import_id ON public.supporters USING btree (import_id); +CREATE INDEX index_supporters_on_import_id ON supporters USING btree (import_id); -- -- Name: index_supporters_on_name; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX index_supporters_on_name ON public.supporters USING btree (name); +CREATE INDEX index_supporters_on_name ON supporters USING btree (name); -- @@ -3345,147 +3348,147 @@ CREATE INDEX index_tickets_on_supporter_id ON public.tickets USING btree (suppor -- Name: index_users_on_confirmation_token; Type: INDEX; Schema: public; Owner: - -- -CREATE UNIQUE INDEX index_users_on_confirmation_token ON public.users USING btree (confirmation_token); +CREATE UNIQUE INDEX index_users_on_confirmation_token ON users USING btree (confirmation_token); -- -- Name: index_users_on_email; Type: INDEX; Schema: public; Owner: - -- -CREATE UNIQUE INDEX index_users_on_email ON public.users USING btree (email); +CREATE UNIQUE INDEX index_users_on_email ON users USING btree (email); -- -- Name: index_users_on_reset_password_token; Type: INDEX; Schema: public; Owner: - -- -CREATE UNIQUE INDEX index_users_on_reset_password_token ON public.users USING btree (reset_password_token); +CREATE UNIQUE INDEX index_users_on_reset_password_token ON users USING btree (reset_password_token); -- -- Name: payments_date; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX payments_date ON public.payments USING btree (date); +CREATE INDEX payments_date ON payments USING btree (date); -- -- Name: payments_donation_id; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX payments_donation_id ON public.payments USING btree (donation_id); +CREATE INDEX payments_donation_id ON payments USING btree (donation_id); -- -- Name: payments_gross_amount; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX payments_gross_amount ON public.payments USING btree (gross_amount); +CREATE INDEX payments_gross_amount ON payments USING btree (gross_amount); -- -- Name: payments_kind; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX payments_kind ON public.payments USING btree (kind); +CREATE INDEX payments_kind ON payments USING btree (kind); -- -- Name: payments_nonprofit_id; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX payments_nonprofit_id ON public.payments USING btree (nonprofit_id); +CREATE INDEX payments_nonprofit_id ON payments USING btree (nonprofit_id); -- -- Name: payments_search_idx; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX payments_search_idx ON public.payments USING gin (search_vectors); +CREATE INDEX payments_search_idx ON payments USING gin (search_vectors); -- -- Name: payments_supporter_id; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX payments_supporter_id ON public.payments USING btree (supporter_id); +CREATE INDEX payments_supporter_id ON payments USING btree (supporter_id); -- -- Name: payments_towards; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX payments_towards ON public.payments USING btree (lower((towards)::text)); +CREATE INDEX payments_towards ON payments USING btree (lower((towards)::text)); -- -- Name: supporters_created_at; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX supporters_created_at ON public.supporters USING btree (created_at) WHERE (deleted <> true); +CREATE INDEX supporters_created_at ON supporters USING btree (created_at) WHERE (deleted <> true); -- -- Name: supporters_email; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX supporters_email ON public.supporters USING btree (lower((email)::text)) WHERE (deleted <> true); +CREATE INDEX supporters_email ON supporters USING btree (lower((email)::text)) WHERE (deleted <> true); -- -- Name: supporters_general_idx; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX supporters_general_idx ON public.supporters USING gin (to_tsvector('english'::regconfig, (((COALESCE(name, ''::character varying))::text || ' '::text) || (COALESCE(email, ''::character varying))::text))); +CREATE INDEX supporters_general_idx ON supporters USING gin (to_tsvector('english'::regconfig, (((COALESCE(name, ''::character varying))::text || ' '::text) || (COALESCE(email, ''::character varying))::text))); -- -- Name: supporters_lower_name; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX supporters_lower_name ON public.supporters USING btree (lower((name)::text)) WHERE (deleted <> true); +CREATE INDEX supporters_lower_name ON supporters USING btree (lower((name)::text)) WHERE (deleted <> true); -- -- Name: supporters_nonprofit_id; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX supporters_nonprofit_id ON public.supporters USING btree (nonprofit_id) WHERE (deleted <> true); +CREATE INDEX supporters_nonprofit_id ON supporters USING btree (nonprofit_id) WHERE (deleted <> true); -- -- Name: supporters_search_idx; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX supporters_search_idx ON public.supporters USING gin (search_vectors); +CREATE INDEX supporters_search_idx ON supporters USING gin (search_vectors); -- -- Name: tag_join_supporter_unique_idx; Type: INDEX; Schema: public; Owner: - -- -CREATE UNIQUE INDEX tag_join_supporter_unique_idx ON public.tag_joins USING btree (tag_master_id, supporter_id); +CREATE UNIQUE INDEX tag_join_supporter_unique_idx ON tag_joins USING btree (tag_master_id, supporter_id); -- -- Name: tag_joins_supporter_id; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX tag_joins_supporter_id ON public.tag_joins USING btree (supporter_id); +CREATE INDEX tag_joins_supporter_id ON tag_joins USING btree (supporter_id); -- -- Name: tag_joins_tag_master_id; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX tag_joins_tag_master_id ON public.tag_joins USING btree (tag_master_id); +CREATE INDEX tag_joins_tag_master_id ON tag_joins USING btree (tag_master_id); -- -- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: - -- -CREATE UNIQUE INDEX unique_schema_migrations ON public.schema_migrations USING btree (version); +CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations USING btree (version); -- @@ -4422,3 +4425,5 @@ INSERT INTO schema_migrations (version) VALUES ('201810202124319'); INSERT INTO schema_migrations (version) VALUES ('201810202124320'); +INSERT INTO schema_migrations (version) VALUES ('201810202124321'); +