Schema - RoosterUnchained/winterest GitHub Wiki
Database Schema
user
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
username | string | not null, indexed, unique |
string | not null, indexed, unique | |
img_url | string | not null |
elo_rating | string | not null |
player_url | string | not null |
password_digest | string | not null |
session_token | string | not null, indexed, unique |
created_at | datetime | not null |
updated_at | datetime | not null |
move
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
author_id | integer | not null, indexed, unique |
img_url | string | not null |
caption | string | not null |
body | string | not null |
created_at | datetime | not null |
updated_at | datetime | not null |
note
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
parent_id | integer | not null, indexed, unique |
author_id | integer | not null |
comment | string | not null |
created_at | datetime | not null |
updated_at | datetime | not null |
study
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
move_id | integer | not null, indexed, foreign key |
student_id | integer | not null, indexed, foreign key |
created_at | datetime | not null |
book
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
author_id | integer | not null, indexed, foreign key |
title | string | not null |
description | string | not null |
created_at | datetime | not null |
updated_at | datetime | not null |
read
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
student_id | integer | not null, unique |
book_id | integer | not null, unique |
created_at | datetime | not null |