supporters/sql/supporters-schema.sql
Bradley M. Kuhn 9c70debfb1 First step to import of Supporter donations.
Ultimately, I decided I had little choice but to create a database of
supporters.  There is really no easy way to track all this properly with
ledger, since ledger is transaction based and this is data that spans
many transactions.

Indeed, even in the NPO Accounting project, we knew there would be
separate data stores for contacts, etc.  This is an ad-hoc start to
that, I guess.
2015-12-06 16:46:43 -08:00

16 lines
508 B
SQL

DROP TABLE IF EXISTS "supporters";
CREATE TABLE "supporters" (
"id" integer NOT NULL PRIMARY KEY,
"paypal_payer" varchar(300) NOT NULL UNIQUE,
"ledger_entity_id" varchar(300) NOT NULL UNIQUE,
"display_name" varchar(300),
"public_ack" bool NOT NULL,
"want_gift" bool NOT NULL,
"join_list" bool,
"shirt_size" varchar(10),
"gift_sent" integer NOT NULL DEFAULT 0,
"on_announce_mailman_list" bool NOT NULL DEFAULT 0,
"formatted_address" varchar(5000)
);