Skip to content

Database diagram

Shen Yang edited this page Sep 23, 2022 · 33 revisions

Table of Contents generated with DocToc

This was generated on 18 December 2021 and it will be out of date as soon as the next db migration is written. You can generate another one at dbdiagram.io by pasting db/schema.rb into the site

1/2

1/2 DB Diagram

2/2

right click and open image in new tab for a higher resolution 2/2 DB Diagram

This image was restyled from https://dbdiagram.io

# Modify this code to update the DB schema diagram.
# To reset the sample schema, replace everything with
# two dots ('..' - without quotes).

casa_cases
-
id PK bigint
case_number string 
transition_aged_youth boolean
created_at datetime
updated_at datetime
casa_org_id bigint
birth_month_year_youth datetime
court_date datetime
court_report_due_date datetime
hearing_type_id bigint
active boolean
judge_id bigint
court_report_submitted_at datetime
court_report_status integer
slug string
date_in_care datetime

casa_cases_emancipation_options
-
id PK int
casa_case_id int FK >- casa_cases.id
emancipation_option_id bigint FK >- emancipation_options.id
TotalAmount money
OrderStatusID int FK >- os.OrderStatusID

emancipation_options
----
id PK bigint
emancipation_category_id bigint 
name UNIQUE string
created_at datetime
updated_at datetime

# Table documentation comment 1 (try the PDF/RTF export)
Product as p # Table documentation comment 2
------------
ProductID PK int
# Field documentation comment 1
# Field documentation comment 2 
Name varchar(200) UNIQUE
Price money

OrderStatus as os
----
OrderStatusID PK int
Name UNIQUE string