Commit 079d23cf authored by Marius Kriegerowski's avatar Marius Kriegerowski Committed by Felix Delattre
Browse files

Added sql linter


Co-authored-by: Felix Delattre's avatarFelix Delattre <fd@gfz-potsdam.de>
parent 86bde927
Pipeline #29427 passed with stage
in 1 minute and 35 seconds
image: python:3-buster
image: python:3-bullseye
linter:
before_script:
- pip3 install sqlfluff
script:
- sqlfluff lint --dialect postgres
test:
before_script:
......
-- Create the `obm_buildings` table
CREATE TABLE public.obm_buildings
(
osm_id integer PRIMARY KEY
);
ALTER TABLE public.obm_buildings
OWNER to postgres;
CREATE TABLE public.obm_buildings (osm_id integer PRIMARY KEY);
ALTER TABLE public.obm_buildings OWNER TO postgres;
ALTER TABLE public.obm_buildings
ADD COLUMN IF NOT EXISTS geometry geometry (Polygon, 4326);
ADD COLUMN IF NOT EXISTS geometry GEOMETRY (POLYGON, 4326);
ALTER TABLE public.obm_buildings DROP COLUMN geometry;
ALTER TABLE public.obm_buildings
DROP COLUMN geometry;
ALTER TABLE public.obm_buildings
ADD COLUMN IF NOT EXISTS geometry geometry (GEOMETRY, 4326);
ADD COLUMN IF NOT EXISTS geometry GEOMETRY (GEOMETRY, 4326);
ALTER TABLE public.obm_buildings
ADD COLUMN IF NOT EXISTS floorspace FLOAT;
ADD COLUMN IF NOT EXISTS floorspace FLOAT;
ALTER TABLE public.obm_buildings
ADD COLUMN if NOT EXISTS occupancy TEXT;
ADD COLUMN IF NOT EXISTS occupancy TEXT;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment