health: drop hair_progress; owner = Stan's account email only
All checks were successful
Deploy production / deploy (push) Successful in 2m22s

Regenerated the (not yet deployed) health migration without hair_progress.
This commit is contained in:
2026-10-24 00:22:24 +00:00
parent 8275f1fb22
commit 8aa689af64
10 changed files with 50 additions and 268 deletions

View File

@@ -28,17 +28,6 @@ CREATE TABLE "health"."body_measurements" (
CONSTRAINT "body_measurements_date_check" CHECK ("date" >= DATE '1900-01-01')
);
--> statement-breakpoint
CREATE TABLE "health"."hair_progress" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid(),
"date" date NOT NULL,
"photo_ref" text,
"notes" text,
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
CONSTRAINT "hair_progress_photo_ref_check" CHECK ("photo_ref" IS NULL OR ("photo_ref" !~* '^[a-z][a-z0-9+.-]*://' AND "photo_ref" !~ '^//')),
CONSTRAINT "hair_progress_date_check" CHECK ("date" >= DATE '1900-01-01')
);
--> statement-breakpoint
CREATE TABLE "health"."medications" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid(),
"name" text NOT NULL,
@@ -122,19 +111,18 @@ CREATE TABLE "health"."workouts" (
--> statement-breakpoint
CREATE INDEX "appointments_date_idx" ON "health"."appointments" ("date");--> statement-breakpoint
CREATE INDEX "body_measurements_date_idx" ON "health"."body_measurements" ("date");--> statement-breakpoint
CREATE INDEX "hair_progress_date_idx" ON "health"."hair_progress" ("date");--> statement-breakpoint
CREATE INDEX "medications_start_date_idx" ON "health"."medications" ("start_date");--> statement-breakpoint
CREATE INDEX "medications_stop_date_idx" ON "health"."medications" ("stop_date");--> statement-breakpoint
CREATE INDEX "vaccinations_date_idx" ON "health"."vaccinations" ("date");--> statement-breakpoint
CREATE INDEX "workouts_date_idx" ON "health"."workouts" ("date");--> statement-breakpoint
CREATE INDEX "workouts_session_idx" ON "health"."workouts" ("session_id");--> statement-breakpoint
CREATE INDEX "workouts_session_idx" ON "health"."workouts" ("session_id");
-- Hand-written below this line (not generated by drizzle-kit).
-- updated_at triggers, same as every other core table (07_triggers_meta_grants.sql).
DO $$
DECLARE t text;
BEGIN
IF to_regprocedure('meta.touch_updated_at()') IS NOT NULL THEN
FOREACH t IN ARRAY ARRAY['vaccinations','body_measurements','workouts','nutrition_daily','sleep','medications','hair_progress','appointments'] LOOP
FOREACH t IN ARRAY ARRAY['vaccinations','body_measurements','workouts','nutrition_daily','sleep','medications','appointments'] LOOP
EXECUTE format('CREATE TRIGGER touch_updated_at BEFORE UPDATE ON health.%I FOR EACH ROW EXECUTE FUNCTION meta.touch_updated_at()', t);
END LOOP;
END IF;

View File

@@ -1,7 +1,7 @@
{
"version": "8",
"dialect": "postgres",
"id": "a9c8c2d8-9454-4842-bd66-3830867023ed",
"id": "b07ff36e-fc9d-4dd4-a267-448a6e807617",
"prevIds": [
"f166e058-a62b-4994-b4ba-12ee871a8bb0"
],
@@ -423,12 +423,6 @@
"entityType": "tables",
"schema": "health"
},
{
"isRlsEnabled": false,
"name": "hair_progress",
"entityType": "tables",
"schema": "health"
},
{
"isRlsEnabled": false,
"name": "medications",
@@ -7463,84 +7457,6 @@
"schema": "health",
"table": "body_measurements"
},
{
"type": "uuid",
"typeSchema": null,
"notNull": true,
"dimensions": 0,
"default": "gen_random_uuid()",
"generated": null,
"identity": null,
"name": "id",
"entityType": "columns",
"schema": "health",
"table": "hair_progress"
},
{
"type": "date",
"typeSchema": null,
"notNull": true,
"dimensions": 0,
"default": null,
"generated": null,
"identity": null,
"name": "date",
"entityType": "columns",
"schema": "health",
"table": "hair_progress"
},
{
"type": "text",
"typeSchema": null,
"notNull": false,
"dimensions": 0,
"default": null,
"generated": null,
"identity": null,
"name": "photo_ref",
"entityType": "columns",
"schema": "health",
"table": "hair_progress"
},
{
"type": "text",
"typeSchema": null,
"notNull": false,
"dimensions": 0,
"default": null,
"generated": null,
"identity": null,
"name": "notes",
"entityType": "columns",
"schema": "health",
"table": "hair_progress"
},
{
"type": "timestamp with time zone",
"typeSchema": null,
"notNull": true,
"dimensions": 0,
"default": "now()",
"generated": null,
"identity": null,
"name": "created_at",
"entityType": "columns",
"schema": "health",
"table": "hair_progress"
},
{
"type": "timestamp with time zone",
"typeSchema": null,
"notNull": true,
"dimensions": 0,
"default": "now()",
"generated": null,
"identity": null,
"name": "updated_at",
"entityType": "columns",
"schema": "health",
"table": "hair_progress"
},
{
"type": "uuid",
"typeSchema": null,
@@ -9114,27 +9030,6 @@
"schema": "health",
"table": "body_measurements"
},
{
"nameExplicit": true,
"columns": [
{
"value": "date",
"isExpression": false,
"asc": true,
"nullsFirst": false,
"opclass": null
}
],
"isUnique": false,
"where": null,
"with": "",
"method": "btree",
"concurrently": false,
"name": "hair_progress_date_idx",
"entityType": "indexes",
"schema": "health",
"table": "hair_progress"
},
{
"nameExplicit": true,
"columns": [
@@ -10888,16 +10783,6 @@
"table": "body_measurements",
"entityType": "pks"
},
{
"columns": [
"id"
],
"nameExplicit": false,
"name": "hair_progress_pkey",
"schema": "health",
"table": "hair_progress",
"entityType": "pks"
},
{
"columns": [
"id"
@@ -11560,20 +11445,6 @@
"schema": "health",
"table": "body_measurements"
},
{
"value": "\"photo_ref\" IS NULL OR (\"photo_ref\" !~* '^[a-z][a-z0-9+.-]*://' AND \"photo_ref\" !~ '^//')",
"name": "hair_progress_photo_ref_check",
"entityType": "checks",
"schema": "health",
"table": "hair_progress"
},
{
"value": "\"date\" >= DATE '1900-01-01'",
"name": "hair_progress_date_check",
"entityType": "checks",
"schema": "health",
"table": "hair_progress"
},
{
"value": "length(btrim(\"name\")) > 0",
"name": "medications_name_check",