From ecb99e08531ff4d22e1a2204989e848347b3a756 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Thu, 22 Aug 2024 22:45:15 +0200 Subject: Add field `moving activity` Following https://developers.google.com/android/reference/com/google/android/gms/location/DetectedActivity --- schema/init.sql | 3 +++ 1 file changed, 3 insertions(+) (limited to 'schema/init.sql') diff --git a/schema/init.sql b/schema/init.sql index f2bc431..682431c 100644 --- a/schema/init.sql +++ b/schema/init.sql @@ -6,11 +6,14 @@ CREATE TABLE users( PRIMARY KEY (id) ); +CREATE TYPE moving_activity AS ENUM ('InVehicle', 'OnFoot', 'Running', 'Walking', 'Still'); + CREATE TABLE positions( id SERIAL NOT NULL, user_id INTEGER NOT NULL, created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), location GEOGRAPHY(Point, 4326) NOT NULL, + activity moving_activity NOT NULL, PRIMARY KEY(id), CONSTRAINT fk_users_id FOREIGN KEY(user_id) REFERENCES users(id) -- cgit v1.2.3-18-g5258