dragndrop_hld/oldqc/alter_test_table.sql
alex 12407b74e4 Initial commit - Stage 1 working version
Saving current working state before proceeding to Stage 2.
Includes:
- Backend: Python-based QC validator with shapefile processing
- Frontend: Drag-and-drop file upload interface
- Sample files for testing
- Documentation and revision history

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 13:43:57 -07:00

18 lines
655 B
SQL

-- Add missing columns to eli_test.segment2 to match expected schema
ALTER TABLE eli_test.segment2
ADD COLUMN IF NOT EXISTS id_0 INTEGER,
ADD COLUMN IF NOT EXISTS mapid INTEGER,
ADD COLUMN IF NOT EXISTS segment_type VARCHAR(80),
ADD COLUMN IF NOT EXISTS segment_status VARCHAR(80),
ADD COLUMN IF NOT EXISTS id INTEGER,
ADD COLUMN IF NOT EXISTS protection_status VARCHAR(80),
ADD COLUMN IF NOT EXISTS qc_flag VARCHAR(255),
ADD COLUMN IF NOT EXISTS group_1 TEXT;
-- Copy "Group 1" data to group_1 if it exists
UPDATE eli_test.segment2 SET group_1 = "Group 1" WHERE "Group 1" IS NOT NULL;
-- Verify the new structure
\d eli_test.segment2