summaryrefslogtreecommitdiff
path: root/migrations
diff options
context:
space:
mode:
authorbatsumaru <>2026-10-15 14:43:23 +0900
committerbatsumaru <>2026-10-15 14:43:23 +0900
commita007b22a23397ec6dc69736e73f85746ce457355 (patch)
tree82b077b16bf83a289edc636f59802f34b7d78ec5 /migrations
parent082e9db3ea5edca9d20558a777addd3b67ca921c (diff)
Add API skeleton
Diffstat (limited to 'migrations')
-rw-r--r--migrations/202610150001_add_metric_type.sql1
-rw-r--r--migrations/202610150002_add_unit.sql1
-rw-r--r--migrations/202610150003_add_measurement.sql7
3 files changed, 9 insertions, 0 deletions
diff --git a/migrations/202610150001_add_metric_type.sql b/migrations/202610150001_add_metric_type.sql
new file mode 100644
index 0000000..8f6ae38
--- /dev/null
+++ b/migrations/202610150001_add_metric_type.sql
@@ -0,0 +1 @@
+CREATE TYPE metric_type AS ENUM ('BodyWeight', 'Hip', 'Waist'); \ No newline at end of file
diff --git a/migrations/202610150002_add_unit.sql b/migrations/202610150002_add_unit.sql
new file mode 100644
index 0000000..1d03843
--- /dev/null
+++ b/migrations/202610150002_add_unit.sql
@@ -0,0 +1 @@
+CREATE TYPE unit AS ENUM ('Kilogram', 'Centimeter'); \ No newline at end of file
diff --git a/migrations/202610150003_add_measurement.sql b/migrations/202610150003_add_measurement.sql
new file mode 100644
index 0000000..364e265
--- /dev/null
+++ b/migrations/202610150003_add_measurement.sql
@@ -0,0 +1,7 @@
+CREATE TABLE IF NOT EXISTS measurement (
+ id UUID PRIMARY KEY,
+ measured_at TIMESTAMPTZ NOT NULL,
+ metric_type metric_type NOT NULL,
+ value DOUBLE PRECISION NOT NULL,
+ unit unit NOT NULL
+); \ No newline at end of file