Size / Age & History Sources

Adding source link(s) field to activated data sources in the Size category and the Age & History category
This commit is contained in:
Mike Simpson 2023-05-23 21:27:45 +01:00
parent 4c32710358
commit 19c906fcc5
8 changed files with 333 additions and 94 deletions

View File

@ -154,10 +154,38 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
edit: true, edit: true,
verify: true, verify: true,
}, },
size_storeys_source_type: {
edit: true,
verify: true,
},
size_storeys_source_links: {
edit: true,
verify: true,
},
size_height_apex: { size_height_apex: {
edit: true, edit: true,
verify: true, verify: true,
}, },
size_height_apex_source_type: {
edit: true,
verify: true,
},
size_height_apex_source_links: {
edit: true,
verify: true,
},
size_height_eaves: {
edit: true,
verify: true,
},
size_height_eaves_source_type: {
edit: true,
verify: true,
},
size_height_eaves_source_links: {
edit: true,
verify: true,
},
size_floor_area_ground: { size_floor_area_ground: {
edit: true, edit: true,
verify: true, verify: true,
@ -166,10 +194,26 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
edit: true, edit: true,
verify: true, verify: true,
}, },
size_floor_area_source_type: {
edit: true,
verify: true,
},
size_floor_area_source_links: {
edit: true,
verify: true,
},
size_width_frontage: { size_width_frontage: {
edit: true, edit: true,
verify: true, verify: true,
}, },
size_width_frontage_source_type: {
edit: true,
verify: true,
},
size_width_frontage_source_links: {
edit: true,
verify: true,
},
construction_core_material: { construction_core_material: {
edit: true, edit: true,
verify: true, verify: true,
@ -326,6 +370,10 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
edit: true, edit: true,
verify: true verify: true
}, },
survival_source_links: {
edit: true,
verify: true
},
likes_total: { likes_total: {
edit: false, edit: false,
derivedEdit: true, derivedEdit: true,

View File

@ -106,14 +106,6 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
placeholder={dataFields.date_source.example} placeholder={dataFields.date_source.example}
options={dataFields.date_source.items} options={dataFields.date_source.items}
/> />
<Verification
slug="date_source"
allow_verify={props.user !== undefined && props.building.date_source !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("date_source")}
user_verified_as={props.user_verified.date_source}
verified_count={props.building.verified.date_source}
/>
<hr/> <hr/>
<InfoBox type='warning'> <InfoBox type='warning'>
This section is under development. This section is under development.
@ -258,6 +250,23 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
placeholder={dataFields.survival_source.example} placeholder={dataFields.survival_source.example}
options={dataFields.survival_source.items} options={dataFields.survival_source.items}
/> />
{(props.building.survival_source == dataFields.survival_source_links[0] ||
props.building.survival_source == dataFields.survival_source_links[1] ||
props.building.survival_source == null) ? <></> :
<><MultiDataEntry
title={dataFields.survival_source_links.title}
slug="survival_source_links"
value={props.building.survival_source_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.survival_source_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
</DataEntryGroup> </DataEntryGroup>
</Fragment> </Fragment>
); );
@ -322,14 +331,6 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
options={dataFields.date_source.items} options={dataFields.date_source.items}
placeholder={dataFields.date_source.example} placeholder={dataFields.date_source.example}
/> />
<Verification
slug="date_source"
allow_verify={props.user !== undefined && props.building.date_source !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("date_source")}
user_verified_as={props.user_verified.date_source}
verified_count={props.building.verified.date_source}
/>
<MultiDataEntry <MultiDataEntry
title={dataFields.date_link.title} title={dataFields.date_link.title}
slug="date_link" slug="date_link"
@ -342,14 +343,6 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
editableEntries={true} editableEntries={true}
isUrl={true} isUrl={true}
/> />
<Verification
slug="date_link"
allow_verify={props.user !== undefined && props.building.date_link !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("date_link")}
user_verified_as={props.user_verified.date_link}
verified_count={props.building.verified.date_link}
/>
<hr/> <hr/>
<InfoBox type='warning'> <InfoBox type='warning'>
This section is under development. This section is under development.
@ -535,7 +528,24 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
tooltip={dataFields.survival_source.tooltip} tooltip={dataFields.survival_source.tooltip}
placeholder={dataFields.survival_source.example} placeholder={dataFields.survival_source.example}
options={dataFields.survival_source.items} options={dataFields.survival_source.items}
/> />
{(props.building.survival_source == dataFields.survival_source.items[0] ||
props.building.survival_source == dataFields.survival_source.items[1] ||
props.building.survival_source == null) ? <></> :
<><MultiDataEntry
title={dataFields.survival_source_links.title}
slug="survival_source_links"
value={props.building.survival_source_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.survival_source_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
</DataEntryGroup> </DataEntryGroup>
</Fragment> </Fragment>
); );

View File

@ -1,6 +1,6 @@
import React, { Fragment } from 'react'; import React, { Fragment } from 'react';
import { dataFields } from '../../config/data-fields-config'; import { commonSourceTypes, dataFields } from '../../config/data-fields-config';
import DataEntry from '../data-components/data-entry'; import DataEntry from '../data-components/data-entry';
import { DataEntryGroup } from '../data-components/data-entry-group'; import { DataEntryGroup } from '../data-components/data-entry-group';
import NumericDataEntry from '../data-components/numeric-data-entry'; import NumericDataEntry from '../data-components/numeric-data-entry';
@ -10,6 +10,7 @@ import withCopyEdit from '../data-container';
import { CategoryViewProps } from './category-view-props'; import { CategoryViewProps } from './category-view-props';
import InfoBox from '../../components/info-box'; import InfoBox from '../../components/info-box';
import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry';
/** /**
* Size view/edit section * Size view/edit section
@ -74,20 +75,33 @@ const SizeView: React.FunctionComponent<CategoryViewProps> = (props) => (
user_verified_as={props.user_verified.size_storeys_basement} user_verified_as={props.user_verified.size_storeys_basement}
verified_count={props.building.verified.size_storeys_basement} verified_count={props.building.verified.size_storeys_basement}
/> />
<DataEntry <SelectDataEntry
title="Source type" title={dataFields.size_storeys_source_type.title}
slug="" slug="size_storeys_source_type"
value="" value={props.building.size_storeys_source_type}
mode='view' options={dataFields.size_storeys_source_type.items}
tooltip="Coming Soon" mode={props.mode}
/> copy={props.copy}
<DataEntry onChange={props.onChange}
title="Source link" tooltip={dataFields.size_storeys_source_type.tooltip}
slug=""
value=""
mode='view'
tooltip="Coming Soon"
/> />
{(props.building.size_storeys_source_type == commonSourceTypes[0] ||
props.building.size_storeys_source_type == commonSourceTypes[1] ||
props.building.size_storeys_source_type == null) ? <></> :
<><MultiDataEntry
title={dataFields.size_storeys_source_links.title}
slug="size_storeys_source_links"
value={props.building.size_storeys_source_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.size_storeys_source_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
</DataEntryGroup> </DataEntryGroup>
<DataEntryGroup name="Building height data"> <DataEntryGroup name="Building height data">
<NumericDataEntry <NumericDataEntry
@ -108,25 +122,37 @@ const SizeView: React.FunctionComponent<CategoryViewProps> = (props) => (
user_verified_as={props.user_verified.size_height_apex} user_verified_as={props.user_verified.size_height_apex}
verified_count={props.building.verified.size_height_apex} verified_count={props.building.verified.size_height_apex}
/> />
<DataEntry <SelectDataEntry
title="Source type" title={dataFields.size_height_apex_source_type.title}
slug="" slug="size_height_apex_source_type"
value="" value={props.building.size_height_apex_source_type}
mode='view' options={dataFields.size_height_apex_source_type.items}
tooltip="Coming Soon" mode={props.mode}
/> copy={props.copy}
<DataEntry onChange={props.onChange}
title="Source link" tooltip={dataFields.size_height_apex_source_type.tooltip}
slug=""
value=""
mode='view'
tooltip="Coming Soon"
/> />
{(props.building.size_height_apex_source_type == commonSourceTypes[0] ||
props.building.size_height_apex_source_type == commonSourceTypes[1] ||
props.building.size_height_apex_source_type == null) ? <></> :
<><MultiDataEntry
title={dataFields.size_height_apex_source_links.title}
slug="size_height_apex_source_links"
value={props.building.size_height_apex_source_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.size_height_apex_source_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
<hr/> <hr/>
<NumericDataEntry <NumericDataEntry
title={dataFields.size_height_eaves.title} title={dataFields.size_height_eaves.title}
slug="size_height_eaves" slug="size_height_eaves"
disabled={true}
value={props.building.size_height_eaves} value={props.building.size_height_eaves}
mode={props.mode} mode={props.mode}
copy={props.copy} copy={props.copy}
@ -134,20 +160,33 @@ const SizeView: React.FunctionComponent<CategoryViewProps> = (props) => (
step={0.1} step={0.1}
min={0} min={0}
/> />
<DataEntry <SelectDataEntry
title="Source type" title={dataFields.size_height_eaves_source_type.title}
slug="" slug="size_height_eaves_source_type"
value="" value={props.building.size_height_eaves_source_type}
mode='view' options={dataFields.size_height_eaves_source_type.items}
tooltip="Coming Soon" mode={props.mode}
/> copy={props.copy}
<DataEntry onChange={props.onChange}
title="Source link" tooltip={dataFields.size_height_eaves_source_type.tooltip}
slug=""
value=""
mode='view'
tooltip="Coming Soon"
/> />
{(props.building.size_height_eaves_source_type == commonSourceTypes[0] ||
props.building.size_height_eaves_source_type == commonSourceTypes[1] ||
props.building.size_height_eaves_source_type == null) ? <></> :
<><MultiDataEntry
title={dataFields.size_height_eaves_source_links.title}
slug="size_height_eaves_source_links"
value={props.building.size_height_eaves_source_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.size_height_eaves_source_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
</DataEntryGroup> </DataEntryGroup>
<DataEntryGroup name="Floor area data"> <DataEntryGroup name="Floor area data">
<NumericDataEntry <NumericDataEntry
@ -186,13 +225,33 @@ const SizeView: React.FunctionComponent<CategoryViewProps> = (props) => (
user_verified_as={props.user_verified.size_floor_area_total} user_verified_as={props.user_verified.size_floor_area_total}
verified_count={props.building.verified.size_floor_area_total} verified_count={props.building.verified.size_floor_area_total}
/> />
<DataEntry <SelectDataEntry
title="Source link" title={dataFields.size_floor_area_source_type.title}
slug="" slug="size_floor_area_source_type"
value="" value={props.building.size_floor_area_source_type}
mode='view' options={dataFields.size_floor_area_source_type.items}
tooltip="Coming Soon" mode={props.mode}
/> copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.size_floor_area_source_type.tooltip}
/>
{(props.building.size_floor_area_source_type == commonSourceTypes[0] ||
props.building.size_floor_area_source_type == commonSourceTypes[1] ||
props.building.size_floor_area_source_type == null) ? <></> :
<><MultiDataEntry
title={dataFields.size_floor_area_source_links.title}
slug="size_floor_area_source_links"
value={props.building.size_floor_area_source_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.size_floor_area_source_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
</DataEntryGroup> </DataEntryGroup>
<DataEntryGroup name="Plot size data"> <DataEntryGroup name="Plot size data">
<NumericDataEntry <NumericDataEntry
@ -300,20 +359,33 @@ const SizeView: React.FunctionComponent<CategoryViewProps> = (props) => (
user_verified_as={props.user_verified.size_width_frontage} user_verified_as={props.user_verified.size_width_frontage}
verified_count={props.building.verified.size_width_frontage} verified_count={props.building.verified.size_width_frontage}
/> />
<DataEntry <SelectDataEntry
title="Source type" title={dataFields.size_width_frontage_source_type.title}
slug="" slug="size_width_frontage_source_type"
value="" value={props.building.size_width_frontage_source_type}
mode='view' options={dataFields.size_width_frontage_source_type.items}
tooltip="Coming Soon" mode={props.mode}
/> copy={props.copy}
<DataEntry onChange={props.onChange}
title="Source link" tooltip={dataFields.size_width_frontage_source_type.tooltip}
slug=""
value=""
mode='view'
tooltip="Coming Soon"
/> />
{(props.building.size_width_frontage_source_type == commonSourceTypes[0] ||
props.building.size_width_frontage_source_type == commonSourceTypes[1] ||
props.building.size_width_frontage_source_type == null) ? <></> :
<><MultiDataEntry
title={dataFields.size_width_frontage_source_links.title}
slug="size_width_frontage_source_links"
value={props.building.size_width_frontage_source_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.size_width_frontage_source_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
</DataEntryGroup> </DataEntryGroup>
</Fragment> </Fragment>
); );

View File

@ -373,7 +373,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
}, },
date_link: { date_link: {
category: Category.Age, category: Category.Age,
title: "Text and Image Links", title: "Source link(s)",
tooltip: "URL for age and date reference", tooltip: "URL for age and date reference",
example: ["", "", ""], example: ["", "", ""],
}, },
@ -396,18 +396,57 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
tooltip: "How many floors below pavement level?", tooltip: "How many floors below pavement level?",
example: 1, example: 1,
}, },
size_storeys_source_type: {
category: Category.Team,
title: "Source type",
tooltip: "Source of building floors data",
example: "",
items: commonSourceTypes
},
size_storeys_source_links: {
category: Category.Team,
title: "Source links",
tooltip: "URL(s) for building floors data source(s)",
example: ["", "", ""],
},
size_height_apex: { size_height_apex: {
category: Category.Size, category: Category.Size,
title: "Height to apex (m)", title: "Height to apex (m)",
example: 100.5, example: 100.5,
tooltip: "i.e. the highest part of the roof.", tooltip: "i.e. the highest part of the roof.",
}, },
size_height_apex_source_type: {
category: Category.Team,
title: "Source type",
tooltip: "Source of building height (apex) data",
example: "",
items: commonSourceTypes
},
size_height_apex_source_links: {
category: Category.Team,
title: "Source links",
tooltip: "URL(s) for building height (apex) source(s)",
example: ["", "", ""],
},
size_height_eaves: { size_height_eaves: {
category: Category.Size, category: Category.Size,
title: "Height to eaves (m)", title: "Height to eaves (m)",
example: 20.33, example: 20.33,
tooltip: "i.e. to where the top of the wall meets the roof", tooltip: "i.e. to where the top of the wall meets the roof",
}, },
size_height_eaves_source_type: {
category: Category.Team,
title: "Source type",
tooltip: "Source of building height (eaves) data",
example: "",
items: commonSourceTypes
},
size_height_eaves_source_links: {
category: Category.Team,
title: "Source links",
tooltip: "URL(s) for building height (eaves) source(s)",
example: ["", "", ""],
},
size_floor_area_ground: { size_floor_area_ground: {
category: Category.Size, category: Category.Size,
title: "Ground floor area (m²)", title: "Ground floor area (m²)",
@ -420,12 +459,38 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
example: 2001.7, example: 2001.7,
//tooltip: , //tooltip: ,
}, },
size_floor_area_source_type: {
category: Category.Team,
title: "Source type",
tooltip: "Source of floor area data",
example: "",
items: commonSourceTypes
},
size_floor_area_source_links: {
category: Category.Team,
title: "Source links",
tooltip: "URL(s) for floor area data source(s)",
example: ["", "", ""],
},
size_width_frontage: { size_width_frontage: {
category: Category.Size, category: Category.Size,
title: "Frontage width (m)", title: "Frontage width (m)",
example: 12.2, example: 12.2,
//tooltip: , //tooltip: ,
}, },
size_width_frontage_source_type: {
category: Category.Team,
title: "Source type",
tooltip: "Source of building frontage data",
example: "",
items: commonSourceTypes
},
size_width_frontage_source_links: {
category: Category.Team,
title: "Source links",
tooltip: "URL(s) for building frontage source(s)",
example: ["", "", ""],
},
size_configuration: { size_configuration: {
category: Category.Size, category: Category.Size,
@ -514,7 +579,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
survival_source: { survival_source: {
category: Category.Age, category: Category.Age,
title: "Source of survival information", title: "Source type",
tooltip: "Source for the survival status", tooltip: "Source for the survival status",
items: [ items: [
"Matched by comparing maps", "Matched by comparing maps",
@ -525,10 +590,10 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
example: "", example: "",
}, },
survival_link: { survival_source_links: {
category: Category.Age, category: Category.Age,
title: "Please add any additional text or image links providing historical information on this building", title: "Source link(s)",
tooltip: "URL for age and date reference", tooltip: "Links to sources of survival/historical information on this building",
example: ["", "", ""], example: ["", "", ""],
}, },

View File

@ -63,9 +63,18 @@ This is the main table, containing almost all data collected by Colouring London
- `size_storeys_attic`: number of attic storeys - `size_storeys_attic`: number of attic storeys
- `size_storeys_core`: number of core storeys - `size_storeys_core`: number of core storeys
- `size_storeys_basement`: number of basement storeys - `size_storeys_basement`: number of basement storeys
- `size_storeys_source_type`: source type for number of storeys
- `size_storeys_source_links`: source links for number of storeys
- `size_height_apex`: height in metres to the building apex - `size_height_apex`: height in metres to the building apex
- `size_height_apex_source_type`: source of apex height data
- `size_height_apex_source_links`: links to apex height data
- `size_height_eaves`: height in metres to the building eaves
- `size_height_eaves_source_type`: source of eaves height data
- `size_height_eaves_source_links`: links to eaves height data
- `size_floor_area_ground`: ground floor floor area in square metres - `size_floor_area_ground`: ground floor floor area in square metres
- `size_floor_area_total`: total floor area in square metres - `size_floor_area_total`: total floor area in square metres
- `size_floor_area_source_type`: source of floor area data
- `size_floor_area_source_links`: link(s) to floor area data
- `size_width_frontage`: width of frontage in metres - `size_width_frontage`: width of frontage in metres
- `construction_core_material`: main structural material - `construction_core_material`: main structural material
- `construction_secondary_materials`: other structural materials - `construction_secondary_materials`: other structural materials
@ -91,7 +100,10 @@ This is the main table, containing almost all data collected by Colouring London
- `likes_total`: number of times the building has been liked by Colouring London users - `likes_total`: number of times the building has been liked by Colouring London users
- `is_domestic`: is the building domestic/non-domestic/mixed - `is_domestic`: is the building domestic/non-domestic/mixed
- `is_domestic_source`: domestic data source type, - `is_domestic_source`: domestic data source type,
-`is_domestic_links`: domestic data source links, - `is_domestic_links`: domestic data source links,
- `survival_status`: survival status compared to historical maps,
- `survival_source`: source of survival data,
- `survival_links`: link(s) to survival data source,
## Building UPRNs ## Building UPRNs

View File

@ -31,9 +31,18 @@ COPY (SELECT
size_storeys_attic, size_storeys_attic,
size_storeys_core, size_storeys_core,
size_storeys_basement, size_storeys_basement,
size_storeys_source_type,
size_storeys_source_links,
size_height_apex, size_height_apex,
size_height_apex_source_type,
size_height_apex_source_links,
size_height_eaves,
size_height_eaves_source_type,
size_height_eaves_source_links,
size_floor_area_ground, size_floor_area_ground,
size_floor_area_total, size_floor_area_total,
size_floor_area_source_type,
size_floor_area_source_links,
size_width_frontage, size_width_frontage,
sust_breeam_rating, sust_breeam_rating,
sust_dec, sust_dec,
@ -63,6 +72,7 @@ COPY (SELECT
likes_total, likes_total,
survival_status, survival_status,
survival_source, survival_source,
survival_source_links,
disaster_type, disaster_type,
disaster_severity, disaster_severity,
disaster_assessment_method, disaster_assessment_method,

View File

@ -4,3 +4,13 @@ ALTER TABLE buildings DROP COLUMN IF EXISTS location_coordinates_source;
ALTER TABLE buildings DROP COLUMN IF EXISTS location_coordinates_links; ALTER TABLE buildings DROP COLUMN IF EXISTS location_coordinates_links;
ALTER TABLE buildings DROP COLUMN IF EXISTS is_domestic_source; ALTER TABLE buildings DROP COLUMN IF EXISTS is_domestic_source;
ALTER TABLE buildings DROP COLUMN IF EXISTS is_domestic_links; ALTER TABLE buildings DROP COLUMN IF EXISTS is_domestic_links;
ALTER TABLE buildings DROP COLUMN IF EXISTS size_storeys_source_type;
ALTER TABLE buildings DROP COLUMN IF EXISTS size_storeys_source_links;
ALTER TABLE buildings DROP COLUMN IF EXISTS size_height_apex_source_type;
ALTER TABLE buildings DROP COLUMN IF EXISTS size_height_apex_source_links;
ALTER TABLE buildings DROP COLUMN IF EXISTS size_height_eaves_source_type;
ALTER TABLE buildings DROP COLUMN IF EXISTS size_height_eaves_source_links;
ALTER TABLE buildings DROP COLUMN IF EXISTS size_height_eaves;
ALTER TABLE buildings DROP COLUMN IF EXISTS size_width_frontage_source_type;
ALTER TABLE buildings DROP COLUMN IF EXISTS size_width_frontage_source_links;
ALTER TABLE buildings DROP COLUMN IF EXISTS survival_source_links;

View File

@ -4,3 +4,15 @@ ALTER TABLE buildings ADD COLUMN IF NOT EXISTS location_coordinates_source text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS location_coordinates_links text[]; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS location_coordinates_links text[];
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS is_domestic_source text; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS is_domestic_source text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS is_domestic_links text[]; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS is_domestic_links text[];
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_storeys_source_type text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_storeys_source_links text[];
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_height_apex_source_type text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_height_apex_source_links text[];
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_height_eaves_source_type text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_height_eaves_source_links text[];
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_height_eaves text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_floor_area_source_type text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_floor_area_source_links text[];
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_width_frontage_source_type text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_width_frontage_source_links text[];
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS survival_source_links text[];