NYCPlanning / db-developments

🏠 🏘️ 🏗️ Developments Database
https://nycplanning.github.io/db-developments
8 stars 2 forks source link

track corrections not applied issues #477

Closed SPTKL closed 3 years ago

SPTKL commented 3 years ago

image image

SPTKL commented 3 years ago
CREATE TEMP TABLE _manual_corrections_hotel_init AS (
    SELECT 
        job_number,
        'hotel_init' as field,
        old_value,
        new_value,
        reason,
        edited_date,
        editor
    FROM _manual_corrections WHERE field = 'classa_init'
);

CALL apply_correction('_UNITS_devdb_raw', '_manual_corrections_hotel_init', 'hotel_init');

use temporary tables to make corrections much easier to understand