[ ] data_sources.data_source_created -> created_at, with default time for when it was created; type becomes timestamp with time zone
[ ] data_sources.source_last_updated -> updated_at, with default time for when it was created; type becomes timestamp with time zone. Set up trigger so that it is updated when associated row is updated.
[ ] Update data_sources.url_status to accept an enum of permitted values; set default to 'okay'
[ ] Update data_sources.retention_schedule to accept an enum of permitted values
[ ] Update data_sources.approval_status to default to pending, set it to not allow null values, and create an enum for the column's acceptable values.
[ ] Convert data_sources.tags column to an array
[ ] Convert data_sources.record_formats column to an array
[ ] Update data_sources.access_type column to access_types, made an array of enums
[ ] Update data_sources.detail_level column to enum
[ ] Update data_sources.agency_aggregation to enum
[ ] Update data_sources.update_method to enum
[ ] Set agencies.submitted_name column to not be null
Remove data_sources columns Columns
[ ] url_broken: was replaced by url_status
[ ] approved: was replaced by approval_status
[ ] records_not_online: was replaced by...nothing, or maybe url status
[ ] record_type: Replaced by record_type_id*
[ ] record_type_other: Not used
[ ] number_of_records_available: Not used
[ ] size: Not used
[ ] private_access_instructions: Not used
[ ] airtable_source_last_modified: Not used
[ ] url_button: Not used
[ ] tags_other: Not used
Testing
Run migration script in automation manager.
Convert above changes occur as expected.
Performance
Trigger adds increased overhead.
Other performance impacts marginal.
Docs
Not applicable.
Breaking Changes
Scripts which previously ran directly on the affected columns above are liable to be broken or produce different outputs.
Fixes
Description
Update columns
data_sources.data_source_created
->created_at
, with default time for when it was created; type becomestimestamp with time zone
data_sources.source_last_updated
->updated_at
, with default time for when it was created; type becomestimestamp with time zone
. Set up trigger so that it is updated when associated row is updated.data_sources.url_status
to accept an enum of permitted values; set default to 'okay'data_sources.retention_schedule
to accept an enum of permitted valuesdata_sources.approval_status
to default topending
, set it to not allow null values, and create an enum for the column's acceptable values.data_sources.tags
column to an arraydata_sources.record_formats
column to an arraydata_sources.access_type
column toaccess_types
, made an array of enumsdata_sources.detail_level
column to enumdata_sources.agency_aggregation
to enumdata_sources.update_method
to enumagencies.submitted_name
column to not be nullRemove
data_sources
columns Columnsurl_broken
: was replaced byurl_status
approved
: was replaced byapproval_status
records_not_online
: was replaced by...nothing, or maybe url statusrecord_type
: Replaced byrecord_type_id
*record_type_other
: Not usednumber_of_records_available
: Not usedsize
: Not usedprivate_access_instructions
: Not usedairtable_source_last_modified
: Not usedurl_button
: Not usedtags_other
: Not usedTesting
Performance
Docs
Breaking Changes