Foundations
Dead, Beat, Dad - Part 3
Jack is back
Jack’s return home went better than I expected. There’s anxiety with introducing an infant to pets, especially to a pet that hasn’t met a newborn before. We took it in stages, first letting Jack play with Janice, then showing him some fragrant swaddle cloths.
He seemed to understand what was going on and was gentle sniffing Baby H. Now he follows us where we carry her and has a perpetual look of concern on his face. I think he’s annoyed that we grew the pack without getting him any backup in the security department.
Breaking ground
The two main pages needed for basic functionality are a view to display the log and a view to enter new log entries. More can be added, but that’s enough for testing. I’ll start with a simple nav bar, and refine if that’s too cumbersome.
For ease of data entry, the webapp needs to be mobile first. I’ll make it functional on larger tablets and screens, but they aren’t a big concern at the moment.
To start on either, I need to define the schema. Here’s a rough first pass.
1CREATE TABLE feed_log (
2 id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
3 start_time TIMESTAMPTZ NOT NULL,
4 left_breast_time SMALLINT,
5 right_breast_time SMALLINT,
6 pump_time SMALLINT,
7 expressed_amount DOUBLE,
8 formula_type TEXT,
9 formula_amount DOUBLE,
10
11 created_at TIMESTAMPTZ,
12 updated_at TIMESTAMPTZ
13);
14
15CREATE TABLE elimination_log (
16 id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
17 start_time TIMESTAMPTZ NOT NULL,
18 urine_count SMALLINT,
19 stool_count SMALLINT,
20
21 created_at TIMESTAMPTZ,
22 updated_at TIMESTAMPTZ
23);
The goal for the day is to render the log page, populated with data in postgres.