ducky/subscriptions
2015-09-27
Parent:61c4ce5850da
ducky/subscriptions/sql/postgres_init.sql
Add comments, move ChangingSystemProperties to the api package. Add comments to all our exported types and variables in subscription.go, both to make golint happy and because it's good to have comments. Move the subscriptions.ChangingSystemProperties helper to api.changingSystemProperties, because it returns API-specific strings and there's no real reason it has to be in the subscriptions package--everything it needs to work on is exported.
| paddy@1 | 1 CREATE TABLE IF NOT EXISTS subscriptions ( |
| paddy@1 | 2 user_id VARCHAR(36) PRIMARY KEY, |
| paddy@2 | 3 stripe_subscription VARCHAR(36) UNIQUE NOT NULL, |
| paddy@2 | 4 plan VARCHAR(36) NOT NULL, |
| paddy@2 | 5 status VARCHAR(16) NOT NULL, |
| paddy@2 | 6 canceling BOOLEAN NOT NULL, |
| paddy@1 | 7 created TIMESTAMPTZ NOT NULL, |
| paddy@2 | 8 trial_start TIMESTAMPTZ NOT NULL, |
| paddy@2 | 9 trial_end TIMESTAMPTZ NOT NULL, |
| paddy@2 | 10 period_start TIMESTAMPTZ NOT NULL, |
| paddy@2 | 11 period_end TIMESTAMPTZ NOT NULL, |
| paddy@2 | 12 canceled_at TIMESTAMPTZ NOT NULL, |
| paddy@2 | 13 failed_charge_attempts INTEGER NOT NULL, |
| paddy@2 | 14 last_failed_charge TIMESTAMPTZ NOT NULL, |
| paddy@2 | 15 last_notified TIMESTAMPTZ NOT NULL |
| paddy@1 | 16 ); |