- Remove TravelLine/netup-pms pull route (travelline.ts unused) - Remove pull integration section from TvWelcomePage (token field, API URL, etc.) - Migration 008: netup_push_log table (hotel_id, action, status, request/response body) - recordPush() now writes to DB in addition to in-memory buffer - getLog reads from DB so logs survive server restarts - clearLog deletes from DB - Limit enforced: 50 rows per hotel (oldest auto-deleted) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
17 lines
646 B
SQL
17 lines
646 B
SQL
CREATE TABLE IF NOT EXISTS netup_push_log (
|
|
id BIGSERIAL PRIMARY KEY,
|
|
hotel_id UUID NOT NULL REFERENCES hotels(id) ON DELETE CASCADE,
|
|
ts TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
|
action TEXT NOT NULL, -- 'check-in' | 'check-out' | 'message'
|
|
room_number TEXT NOT NULL DEFAULT '',
|
|
netup_room TEXT NOT NULL DEFAULT '',
|
|
url TEXT NOT NULL DEFAULT '',
|
|
request_body JSONB,
|
|
status TEXT NOT NULL, -- 'ok' | 'error' | 'skipped'
|
|
http_status INT,
|
|
response_body TEXT,
|
|
error TEXT
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_netup_push_log_hotel_ts ON netup_push_log(hotel_id, ts DESC);
|