-
Notifications
You must be signed in to change notification settings - Fork 0
Database Schema
Demeatrice J. Sherrod edited this page Feb 4, 2021
·
18 revisions

| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
name |
string | not null |
email |
string | not null, unique |
hashed_password |
string | not null |
created_at |
datetime | not null |
updated_at |
datetime | not null |
- unique constraint on
email - SQLAlchemy
Dreamsrelationship - SQLAlchemy
Fragmentsrelationship
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
title |
string | unique |
notes |
text | |
keywords |
string | |
dreamer_id |
integer | not null, foreign key |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
dreamer_idreferencesUserstable as aforeign key - unique constraint on
title - SQLAlchemy
Usersrelationship - SQLAlchemy
FragmentsrelationshipviaDreams_Fragmentstable
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
title |
string | |
setting |
string | |
emotions |
string | |
description |
text | |
user_id |
integer | not null, foreign key |
createdAt |
datetime | not null |
updatedAt |
datetime | not null |
-
user_idreferencesUserstable as aforeign key - SQLAlchemy
Usersrelationship - SQLAlchemy
DreamsrelationshipviaDreams_Fragmentstable
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
dream_id |
integer | not null, foreign key |
fragment_id |
integer | not null, foreign key |
createdAt |
datetime | not null |
updatedAt |
datetime | not null |
-
dream_idreferencesDreamstable as aforeign key -
fragment_idreferencesFragmentstable as aforeign key - SQLAlchemy
Dreamsrelationship - SQLAlchemy
Fragmentsrelationship
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
image_url |
string | not null |
createdAt |
datetime | not null |
updatedAt |
datetime | not null |
- SQLAlchemy
FragmentsrelationshipviaFragments_Imagestable
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
fragment_id |
integer | not null, foreign key |
image_id |
integer | not null, foreign key |
-
fragment_idreferencesFragmentstable as aforeign key -
image_idreferencesImagestable as aforeign key - SQLAlchemy
Fragmentsrelationship - SQLAlchemy
Imagesrelationship
