Skip to content

Commit

Permalink
migration to support version 0.9.5
Browse files Browse the repository at this point in the history
  • Loading branch information
KellyMWhitehead authored and philipbaileynar committed Sep 18, 2024
1 parent 2c7ad84 commit 5e4dba5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/db/migrations/027_ltpbr_v2_layer_fixes.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-- Remove Brat Vegetation Suitability Layer
DELETE FROM layers WHERE fc_name = 'brat_vegetation';
DELETE FROM event_layers WHERE layer_id = 17;

-- Fix logic for Structural Elements layer
UPDATE layers SET metadata = '{"hierarchy": ["Observations", "Structural Elements"], "fields": [{"machine_code": "structural_element_type", "label": "Type", "type": "list", "lookup": "structural_element_points"}, {"machine_code": "structure_count", "label": "Structure Count", "type": "integer", "default": 1, "visibility": {"field_name": "structural_element_type", "values": ["Dam Complex", "Jam Complex"]}}, {"machine_code": "length", "label": "Length", "type": "float", "visibility": {"field_name": "structural_element_type", "values": ["Dam", "Jam", "Other", "Root Mass"]}}, {"machine_code": "width", "label": "Width", "type": "float", "visibility": {"field_name": "structural_element_type", "values": ["Dam", "Jam", "Other", "Root Mass"]}}, {"machine_code": "height", "label": "Height", "type": "float", "visibility": {"field_name": "structural_element_type", "values": ["Dam", "Jam", "Root Mass", "Other"]}}, {"machine_code": "large_wood_count", "label": "Large Wood Count", "type": "integer"}]}' WHERE fc_name = 'structural_elements_points';

0 comments on commit 5e4dba5

Please sign in to comment.