4
0
Fork 0
mirror of https://github.com/zzzzDev4/ias-tea-axum.git synced 2025-04-21 07:41:21 +02:00
backend/migrations/0001_init.sql

21 lines
No EOL
615 B
SQL

CREATE TABLE IF NOT EXISTS tea (
id serial PRIMARY KEY,
tea_name VARCHAR(128) NOT NULL,
rfid_code VARCHAR(128) NOT NULL,
tea_notes: VARCHAR(512),
water_temp INT,
steeping_seconds INT NOT NULL,
registration_timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE IF NOT EXISTS steepinglog (
change_id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
tea_id INT NOT NULL,
steeping_seconds INT NOT NULL,
steeping_tested_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE IF NOT EXISTS config (
default_steeping_time INT NOT NULL,
feedback_timeout BIGINT NOT NULL
);