-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase_schema.csv
More file actions
We can make this file beautiful and searchable if this error is corrected: It looks like row 49 should actually have 8 columns, instead of 10 in line 48.
66 lines (66 loc) · 4.88 KB
/
Copy pathdatabase_schema.csv
File metadata and controls
66 lines (66 loc) · 4.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Table,Column,DataType,PrimaryKey,ForeignKey,References,Nullable,Description
users,id,SERIAL,TRUE,FALSE,,FALSE,Unique identifier for users
users,email,VARCHAR(255),FALSE,FALSE,,FALSE,User email address (unique)
users,password,VARCHAR(255),FALSE,FALSE,,FALSE,Hashed password
users,name,VARCHAR(255),FALSE,FALSE,,FALSE,User full name
users,role,VARCHAR(50),FALSE,FALSE,,FALSE,"User role (admin, donor, volunteer, foodbank)"
users,phone,VARCHAR(20),FALSE,FALSE,,TRUE,User phone number
users,address,VARCHAR(255),FALSE,FALSE,,TRUE,User address
users,city,VARCHAR(100),FALSE,FALSE,,TRUE,User city
users,state,VARCHAR(100),FALSE,FALSE,,TRUE,User state/province
users,zip_code,VARCHAR(20),FALSE,FALSE,,TRUE,User postal code
users,created_at,TIMESTAMP,FALSE,FALSE,,FALSE,Record creation timestamp
users,updated_at,TIMESTAMP,FALSE,FALSE,,FALSE,Record update timestamp
users,last_login,TIMESTAMP,FALSE,FALSE,,TRUE,Last login timestamp
users,status,VARCHAR(20),FALSE,FALSE,,FALSE,"Account status (active, inactive, suspended)"
donations,id,SERIAL,TRUE,FALSE,,FALSE,Unique identifier for donations
donations,donor_id,INTEGER,FALSE,TRUE,users.id,FALSE,Reference to donor user
donations,title,VARCHAR(255),FALSE,FALSE,,FALSE,Donation title
donations,description,TEXT,FALSE,FALSE,,TRUE,Donation description
donations,quantity,NUMERIC,FALSE,FALSE,,FALSE,Donation quantity
donations,unit,VARCHAR(20),FALSE,FALSE,,FALSE,"Unit of measurement (kg, lbs, items, etc.)"
donations,expiry_date,DATE,FALSE,FALSE,,TRUE,Expiration date of food items
donations,pickup_address,VARCHAR(255),FALSE,FALSE,,FALSE,Pickup location address
donations,pickup_city,VARCHAR(100),FALSE,FALSE,,FALSE,Pickup location city
donations,pickup_state,VARCHAR(100),FALSE,FALSE,,FALSE,Pickup location state/province
donations,pickup_zip_code,VARCHAR(20),FALSE,FALSE,,FALSE,Pickup location postal code
donations,pickup_instructions,TEXT,FALSE,FALSE,,TRUE,Special instructions for pickup
donations,pickup_date,DATE,FALSE,FALSE,,FALSE,Scheduled pickup date
donations,pickup_time_start,TIME,FALSE,FALSE,,FALSE,Pickup window start time
donations,pickup_time_end,TIME,FALSE,FALSE,,FALSE,Pickup window end time
donations,status,VARCHAR(20),FALSE,FALSE,,FALSE,"Donation status (pending, assigned, in_transit, completed, cancelled)"
donations,volunteer_id,INTEGER,FALSE,TRUE,users.id,TRUE,Reference to assigned volunteer user
donations,foodbank_id,INTEGER,FALSE,TRUE,users.id,TRUE,Reference to assigned foodbank user
donations,created_at,TIMESTAMP,FALSE,FALSE,,FALSE,Record creation timestamp
donations,updated_at,TIMESTAMP,FALSE,FALSE,,FALSE,Record update timestamp
categories,id,SERIAL,TRUE,FALSE,,FALSE,Unique identifier for food categories
categories,name,VARCHAR(100),FALSE,FALSE,,FALSE,Category name
categories,description,TEXT,FALSE,FALSE,,TRUE,Category description
categories,created_at,TIMESTAMP,FALSE,FALSE,,FALSE,Record creation timestamp
categories,updated_at,TIMESTAMP,FALSE,FALSE,,FALSE,Record update timestamp
donation_categories,donation_id,INTEGER,TRUE,TRUE,donations.id,FALSE,Reference to donation
donation_categories,category_id,INTEGER,TRUE,TRUE,categories.id,FALSE,Reference to category
notifications,id,SERIAL,TRUE,FALSE,,FALSE,Unique identifier for notifications
notifications,user_id,INTEGER,FALSE,TRUE,users.id,FALSE,User receiving the notification
notifications,title,VARCHAR(255),FALSE,FALSE,,FALSE,Notification title
notifications,message,TEXT,FALSE,FALSE,,FALSE,Notification message content
notifications,type,VARCHAR(20),FALSE,FALSE,,FALSE,"Notification type (info, success, warning, error)"
notifications,read,BOOLEAN,FALSE,FALSE,,FALSE,Whether notification has been read
notifications,related_id,INTEGER,FALSE,FALSE,,TRUE,ID of related entity (donation, user, etc.)
notifications,related_type,VARCHAR(50),FALSE,FALSE,,TRUE,"Type of related entity (donation, user, etc.)"
notifications,created_at,TIMESTAMP,FALSE,FALSE,,FALSE,Record creation timestamp
notifications,updated_at,TIMESTAMP,FALSE,FALSE,,FALSE,Record update timestamp
sessions,id,VARCHAR(255),TRUE,FALSE,,FALSE,Session identifier
sessions,user_id,INTEGER,FALSE,TRUE,users.id,FALSE,Reference to user
sessions,expires_at,TIMESTAMP,FALSE,FALSE,,FALSE,Session expiration timestamp
sessions,data,JSONB,FALSE,FALSE,,TRUE,Session data
sessions,created_at,TIMESTAMP,FALSE,FALSE,,FALSE,Record creation timestamp
sessions,updated_at,TIMESTAMP,FALSE,FALSE,,FALSE,Record update timestamp
inventory,id,SERIAL,TRUE,FALSE,,FALSE,Unique identifier for inventory items
inventory,foodbank_id,INTEGER,FALSE,TRUE,users.id,FALSE,Reference to foodbank user
inventory,category_id,INTEGER,FALSE,TRUE,categories.id,FALSE,Reference to food category
inventory,quantity,NUMERIC,FALSE,FALSE,,FALSE,Available quantity
inventory,unit,VARCHAR(20),FALSE,FALSE,,FALSE,Unit of measurement
inventory,expiry_date,DATE,FALSE,FALSE,,TRUE,Expiration date
inventory,created_at,TIMESTAMP,FALSE,FALSE,,FALSE,Record creation timestamp
inventory,updated_at,TIMESTAMP,FALSE,FALSE,,FALSE,Record update timestamp