rgncycle-db/sql/create-entities-table.sql

32 lines
1022 B
MySQL
Raw Normal View History

2023-03-15 14:30:41 +01:00
---
DROP TABLE IF EXISTS tbl_distances CASCADE;
2023-04-19 14:41:34 +02:00
---
DROP TABLE IF EXISTS tbl_relations_coord CASCADE;
2023-03-15 14:30:41 +01:00
---
DROP TABLE IF EXISTS tbl_relations CASCADE;
---
DROP TABLE IF EXISTS tbl_entities CASCADE;
---
CREATE TABLE IF NOT EXISTS tbl_entities(
2023-04-19 14:32:53 +02:00
entity_id BIGSERIAL PRIMARY KEY,
entity_name TEXT NOT NULL,
entity_lat DOUBLE PRECISION NULL,
entity_lon DOUBLE PRECISION NULL);
2023-03-15 14:52:42 +01:00
---
DELETE FROM tbl_entities;
INSERT INTO tbl_entities (entity_name,entity_lat,entity_lon)
2023-03-15 14:52:42 +01:00
VALUES
2023-04-19 14:32:53 +02:00
('AfB gGmbH',50.8320953,6.4719321),
('Green Planet Energy eG',53.5416469,10.0013917),
('Hostsharing eG',53.6388387,10.0148720),
('WEtell GmbH',48.0143619,7.8450213),
2023-04-21 15:31:49 +02:00
('WTF Kooperative eG',53.5836365,10.0153690),
2023-04-25 21:36:30 +02:00
('Software Ingenieur Begerad',52.2659474, 10.4394900),
2023-04-21 15:31:49 +02:00
('GLS Gemeinschaftsbank eG',51.4708953,7.2195074),
('Fairphone', 52.3900606,4.8890757),
2023-04-25 21:36:30 +02:00
('dieUmweltDruckerei GmbH',52.3741017,9.7454469),
('Reka',52.1625908,10.2982074),
('Hof Morgentau',52.2254150,10.4556969),
('Der kleine Heideladen',52.2651152, 10.43836880)
2023-03-15 14:52:42 +01:00
RETURNING *;