~williamvds/dissertation

3c78dbf0fd4165ef3631625780fcddbb9f6a1749 — williamvds 4 years ago b2fbd6f
scripts: Remove gtrGrantCategory type

It's getting too large and it seems to be provided as free text anyway.
2 files changed, 2 insertions(+), 42 deletions(-)

M scripts/importGtrProjects.sql
M scripts/setup.sql
M scripts/importGtrProjects.sql => scripts/importGtrProjects.sql +1 -1
@@ 65,7 65,7 @@ SELECT
	REPLACE(title, '&', '&'),
	status::gtrProjectStatus,
	-- XML entities aren't parsed, so manually convert ampersands
	REPLACE(category, '&', '&')::gtrGrantCategory,
	REPLACE(category, '&', '&'),
	funder::gtrFunder,
	abstract,
	techAbstract,

M scripts/setup.sql => scripts/setup.sql +1 -41
@@ 76,46 76,6 @@ EXCEPTION
END $$; -- BEGIN

DO $$ BEGIN
	CREATE TYPE gtrGrantCategory as ENUM(
		'BIS-Funded Programmes',
		'Centres',
		'Collaborative R&D',
		'CR&D Bilateral',
		'EU-Funded',
		'European Enterprise Network',
		'Fast Track',
		'Feasibility Studies',
		'Fellowship',
		'GRD Development of Prototype',
		'GRD Proof of Concept',
		'GRD Proof of Market',
		'Intramural',
		'Knowledge Transfer Network',
		'Knowledge Transfer Partnership',
		'Large Project',
		'Launchpad',
		'Legacy Department of Trade & Industry',
		'Legacy RDA Collaborative R&D',
		'Legacy RDA Grant for R&D',
		'Missions',
		'Other Grant',
		'Procurement',
		'Research Grant',
		'Small Business Research Initiative',
		'SME Support',
		'Special Interest Group',
		'Studentship',
		'Study',
		'Third Party Grant',
		'Training Grant',
		'Unknown',
		'Vouchers'
	);
EXCEPTION
	WHEN duplicate_object THEN null;
END $$; -- BEGIN

DO $$ BEGIN
	CREATE TYPE gtrFunder as ENUM(
		'AHRC',
		'BBSRC',


@@ 136,7 96,7 @@ CREATE TABLE IF NOT EXISTS gtrProjects(
	projectUuid uuid PRIMARY KEY NOT NULL,
	title text not null,
	status gtrProjectStatus,
	category gtrGrantCategory,
	category text,
	leadFunder gtrFunder,
	abstract text,
	techAbstract text,