Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Dynamic Exposure
OpenBuildingMap
database-obmbuildings
Commits
9464b627
Commit
9464b627
authored
Oct 18, 2021
by
Marius Kriegerowski
Committed by
Felix Delattre
Oct 18, 2021
Browse files
Added sql linter
Co-authored-by:
Felix Delattre
<
fd@gfz-potsdam.de
>
parent
86bde927
Pipeline
#29121
failed with stage
in 59 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
9464b627
image
:
python:3-buster
image
:
python:3-bullseye
linter
:
before_script
:
-
pip3 install sqlfluff
script
:
-
sqlfluff lint --dialect postgres
test
:
before_script
:
...
...
migrations/00001_create-main-table.sql
View file @
9464b627
-- 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
;
migrations/00003_add_column_geometry.sql
View file @
9464b627
ALTER
TABLE
public
.
obm_buildings
ADD
COLUMN
IF
NOT
EXISTS
geometry
geometry
(
Polygon
,
4326
);
ADD
COLUMN
IF
NOT
EXISTS
geometry
GEOMETRY
(
Polygon
,
4326
);
migrations/00004_change_geometry_type.sql
View file @
9464b627
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
);
migrations/00005_add_column_floorspace.sql
View file @
9464b627
ALTER
TABLE
public
.
obm_buildings
ADD
COLUMN
IF
NOT
EXISTS
floorspace
FLOAT
;
ADD
COLUMN
IF
NOT
EXISTS
floorspace
FLOAT
;
migrations/00006_add_column_occupancy.sql
View file @
9464b627
ALTER
TABLE
public
.
obm_buildings
ADD
COLUMN
if
NOT
EXISTS
occupancy
TEXT
;
ADD
COLUMN
IF
NOT
EXISTS
occupancy
TEXT
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment