Created
April 14, 2016 17:29
-
-
Save kevinburkeshyp/5a40d372b6aa1e1426801d8195cb0b61 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Table "public.users" | |
Column | Type | Modifiers | |
------------------------+--------------------------+------------------------ | |
id | text | | |
email | text | not null | |
password | text | | |
createdAt | timestamp with time zone | | |
updatedAt | timestamp with time zone | | |
facebookId | text | | |
facebookToken | text | | |
isDriver | boolean | | |
isPacker | boolean | | |
isOps | boolean | | |
isAdmin | boolean | | |
phoneNumber | text | | |
phoneNumberVerified | boolean | not null default false | |
paymentStatus | text | | |
customerId | text | | |
referralCode | text | | |
volumeTier | text | | |
photoId | text | | |
photoPath | text | | |
volumeTierOverride | text | | |
senderName | text | | |
feedLastReadAt | timestamp with time zone | | |
postCode | text | | |
lastPlatform | text | | |
completedPickupCount | integer | not null default 0 | |
lastAlertedAt | timestamp with time zone | | |
ambassadorPromoCodeId | text | | |
username | text | | |
isPrivate | boolean | not null default false | |
sentReferralId | text | | |
marketingAttributionId | text | | |
Indexes: | |
"username_unique_lowercase" UNIQUE, btree (lower(username)) | |
"users_email_key" UNIQUE CONSTRAINT, btree (email) | |
"users_id_key" UNIQUE CONSTRAINT, btree (id) | |
"users_referralCode_key" UNIQUE CONSTRAINT, btree ("referralCode") | |
"users_lower_email" btree (lower(email)) | |
"users_lower_id" btree (lower(id)) | |
"users_lower_referralcode" btree (lower("referralCode")) | |
Check constraints: | |
"nonnegative_completedpickupcount" CHECK ("completedPickupCount" >= 0) | |
"username_length" CHECK (char_length(username) <= 20) | |
"username_minimum_length" CHECK (char_length(username) >= 3) | |
"username_valid_characters" CHECK (username ~ '^[a-zA-Z0-9_]+$'::text) | |
Foreign-key constraints: | |
"users_ambassadorPromoCodeId_fkey" FOREIGN KEY ("ambassadorPromoCodeId") REFERENCES promocodes(id) DEFERRABLE | |
"users_marketingAttributionId_fkey" FOREIGN KEY ("marketingAttributionId") REFERENCES marketingattributions(id) DEFERRABLE | |
"users_sentReferralId_fkey" FOREIGN KEY ("sentReferralId") REFERENCES sentreferrals(id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment