-- +goose Up -- REMOVING A SECOND SOURCE OF TRUTH FOR THE ORGANIZATION'S WORKING DAY. -- -- organizations.time_zone has existed since migration 0057. It is written by the task service and it decides -- what "today" means for the task queue, the daily report and every period rollup. Migration 0087 added -- org_settings.time_zone, which is a second copy of the same fact that drives nothing. -- -- Two columns holding one fact do not stay equal. They diverge the first time somebody edits the one their -- screen happens to show, and then the daily report and the settings page disagree about what day it is, -- with no way for a user to tell which is being used. Settings.tsx already carries a comment about exactly -- this class of mistake, from the time account management existed on two screens and the two disagreed about -- what access a person had. -- -- The DUPLICATE is dropped, not the original. The original is the one with things wired to it. ALTER TABLE org_settings DROP COLUMN IF EXISTS time_zone; -- +goose Down ALTER TABLE org_settings ADD COLUMN time_zone text NOT NULL DEFAULT 'America/New_York';