Implement basic city portal logic (and severely deabstract)
- Create a podman compose for Postgres - Implement types and tables for urban data - No longer use a Cargo workspace as there's no point currently - Create query functionality (not mutation yet)
This commit is contained in:
parent
61dd9698bf
commit
c6dd6abaf1
14 changed files with 1704 additions and 150 deletions
20
db/init.sql
Normal file
20
db/init.sql
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
CREATE TABLE datasets (
|
||||
id SERIAL PRIMARY KEY,
|
||||
name TEXT NOT NULL,
|
||||
description TEXT
|
||||
);
|
||||
|
||||
CREATE TABLE locations (
|
||||
id SERIAL PRIMARY KEY,
|
||||
name TEXT,
|
||||
lat DOUBLE PRECISION NOT NULL,
|
||||
lon DOUBLE PRECISION NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE records (
|
||||
id SERIAL PRIMARY KEY,
|
||||
dataset_id INTEGER NOT NULL REFERENCES datasets(id),
|
||||
location_id INTEGER REFERENCES locations(id),
|
||||
timestamp TIMESTAMPTZ NOT NULL,
|
||||
data JSONB
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue