Database Schema - Percapio/Codex GitHub Wiki
Users
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
username | string | not null, indexed, unique |
password_digest | string | not null |
session_token | string | not null, indexed, unique |
string | not null, indexed, unique | |
----------- | --------- | ------- |
Books
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
title | string | not null |
author | string | not null |
summary | text | not null |
bookshelf_id | integer | foreign key |
img_url | string | |
ISBN | integer | not null, indexed, unique |
----------- | --------- | ------- |
Bookshelves
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
title | string | not null |
owner_id | integer | not null, foreign key |
description | text | not null |
----------- | --------- | ------- |
Reviews
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
title | string | not null |
author_id | integer | not null, foreign key |
book_id | integer | not null, foreign key |
description | text | not null |
----------- | --------- | ------- |
Tags
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
title | string | not null |
book_id | integer | foreign key |
description | text | not null |
----------- | --------- | ------- |