Skip to content
Shersheial Borisute edited this page May 8, 2020 · 14 revisions

Welcome to the daily-learning wiki!

Schema

users

column name data type details
id integer not null, primary key
name string
username string not null, indexed, unique
email string not null, indexed, unique
password_digest string not null
session_token string not null, indexed, unique
created_at datetime not null
updated_at datetime not null
  • index on username, unique: true
  • index on email, unique: true
  • index on session_token, unique: true

books

column name data type details
id integer not null, primary key
title_en string not null
title_he string not null
title_he_tr string not null
description string not null
section_id integer not null, indexed, foreign key
created_at datetime not null
updated_at datetime not null
  • index on section_id

sections of tanach

column name data type details
id integer not null, primary key
title_en string not null
title_he string not null
title_he_tr string not null
description string not null
created_at datetime not null
updated_at datetime not null
  • has many books

parshios

column name data type details
id integer not null, primary key
title_en string not null
title_he string not null
title_he_tr string not null
description string not null
created_at datetime not null
updated_at datetime not null

aliyos

column name data type details
id integer not null, primary key
aliyah_number integer not null
parsha_id integer not null, indexed, foreign key
start_perek integer not null
start_pasuk integer not null
end_perek integer not null
end_pasuk integer not null
created_at datetime not null
updated_at datetime not null
  • index on parsha_id

pesukim

column name data type details
id integer not null, primary key
text_he string not null
text_en string not null
unkelos string not null
book_id integer not null, indexed, foreign key
created_at datetime not null
updated_at datetime not null
  • index on book_id

haftoros

this is essentially structured like a parsha/aliya

tehillim

column name data type details
id integer not null, primary key
day_number integer not null
start_perek integer not null
start_pasuk integer
end_perek integer not null
end_pasuk integer
created_at datetime not null
updated_at datetime not null
  • belongs_to :start_pasuk_id, optional: true
  • belongs_to :end_pasuk_id, optional: true

aliya_pesukim

column name data type details
aliya_id bigint not null
pasuk_id bigint not null
created_at datetime not null
updated_at datetime not null
  • index on aliya_id
  • index on pasuk_id
Clone this wiki locally