Mercurial > gemma
annotate schema/updates/1423/01.axis_as_multilinestring.sql @ 5505:2604beecbd1a deactivate-users
Fixed whitespace in SQL statement.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 22 Sep 2021 18:53:19 +0200 |
parents | e8b2dc771f9e |
children |
rev | line source |
---|---|
5009
e8b2dc771f9e
Store axis as MultiLinestring
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
1 -- Cannot alter type of a column used in a trigger definition |
e8b2dc771f9e
Store axis as MultiLinestring
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
2 DROP TRIGGER waterway_axis_wtwaxs_unique ON waterway.waterway_axis; |
e8b2dc771f9e
Store axis as MultiLinestring
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
3 |
e8b2dc771f9e
Store axis as MultiLinestring
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
4 ALTER TABLE waterway.waterway_axis |
e8b2dc771f9e
Store axis as MultiLinestring
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
5 ALTER wtwaxs TYPE geography(MULTILINESTRING, 4326) |
e8b2dc771f9e
Store axis as MultiLinestring
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
6 USING ST_Multi(CAST(wtwaxs AS geometry)); |
e8b2dc771f9e
Store axis as MultiLinestring
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
7 |
e8b2dc771f9e
Store axis as MultiLinestring
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
8 -- Re-create trigger |
e8b2dc771f9e
Store axis as MultiLinestring
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
9 CREATE CONSTRAINT TRIGGER waterway_axis_wtwaxs_unique |
e8b2dc771f9e
Store axis as MultiLinestring
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
10 AFTER INSERT OR UPDATE OF wtwaxs ON waterway.waterway_axis |
e8b2dc771f9e
Store axis as MultiLinestring
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
11 FOR EACH ROW EXECUTE FUNCTION prevent_st_equals('wtwaxs'); |