Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/missionmatch / db/migrations/0097_drop_duplicate_time_zone.sql |
| Date | Not specified in source |
| Repository | Janady13/missionmatch |
| Revision | 720d47fae476b0d38477ae4401697d372b1ea2bc |
| Branch | feature/opportunity-to-outcome |
| Path or archive member | db/migrations/0097_drop_duplicate_time_zone.sql |
| Original SHA-256 | e890e8b90029c44dc4ffb579f53ed2701d31ece201cc6f62442aa4e67ff6e065 |
| Git blob SHA | 1642bab3ae0a4c387e03b3222c2289aaf8066286 |
| Reading-copy SHA-256 | e890e8b90029c44dc4ffb579f53ed2701d31ece201cc6f62442aa4e67ff6e065 |
Recovered source transcript
Download complete source text ↓19 lines · 1.1 KB
-- +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';