-
Notifications
You must be signed in to change notification settings - Fork 0
Database Schema
Arko edited this page Feb 22, 2023
·
9 revisions
column name | data type | details |
---|---|---|
id | int | not null, primary key |
username | string | not null |
string | not null, unique | |
hashed_password | string | not null |
first_name | string | NO |
last_name | string | NO |
created_at | datetime | not null |
updated_at | datetime | nullable |
------------- | -------------- | ----------------------- |
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
user_id | integer | not null, foreign key |
note_id | integer | not null, foreign key |
parent_goal_id | integer, foreign key | nullable |
child_goal_id | integer, foreign key | nullable |
name | string | not null, unique |
description | string | not null |
edit_access | boolean | not null |
difficulty | string | nullable |
importance | string | nullable |
completion_percent | integer | not null |
tags | string | nullable |
due_date | datetime | nullable |
created_at | datetime | not null |
updated-at | datetime | nullable |
finished_on | datetime | nullable |
badges | db.Relationship(badges) | |
users | db.Relationship(users) |
-
user_id
referencesusers
table -
note_id
referencesnotes
table -
parent_goal_id
referencesgoals
table -
child_goal_id
referencesgoals
table -
badges
referencesbadges
table -
users
referencesusers
table for people you have shared a goal with.
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
user_id | integer | not null, foreign key |
note_id | integer | not null, foreign key |
goal_id | integer | not null, foreign key |
parent_task_id | integer, foreign key | nullable |
name | string | not null |
description | string | not null |
edit_access | boolean | not null |
difficulty | string | nullable |
priority | string | nullable |
completion_percent | integer | not null |
tags | string | nullable |
due_date | datetime | nullable |
created_at | datetime | not null |
updated-at | datetime | nullable |
finished_on | datetime | nullable |
badges | db.Relationship(badges) | |
users | db.Relationship(users) | |
child_tasks | db.Relationship(tasks) |
-
user_id
referencesusers
table -
note_id
referencesnotes
table -
goal_id
referencesgoals
table -
parent_task_id
referencestasks
table -
badges
referencesbadges
table -
child_tasks
referenncestasks
table -
users
referencesusers
table for people you have shared a goal with.
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
goal_id | integer | not null, foreign key |
note_body | string | nullable |
created_at | datetime | not null |
updated-at | datetime | nullable |
-
goal_id
referencesgoals
table
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
task_id | integer | not null, foreign key |
note_body | string | nullable |
created_at | datetime | not null |
updated-at | datetime | nullable |
-
task_id
referencestasks
table
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
user_id | integer | not null, foreign key |
name | string | not null |
description | string | not null |
url | string | not null |
created_at | datetime | not null |
updated-at | datetime | nullable |
-
user_id
referencesusers
table
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
user_id | integer | not null, foreign key |
address | string | not null |
city | string | not null |
state | string | not null |
zip | string | not null |
country | string | not null |
-
user_id
referencesusers
table