Skip to content

Commit f1beb35

Browse files
committed
Pre populate roles table
1 parent ba251de commit f1beb35

File tree

1 file changed

+10
-1
lines changed
  • cli/macrostrat/cli/database/migrations/people

1 file changed

+10
-1
lines changed

cli/macrostrat/cli/database/migrations/people/main.sql

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,13 @@ CREATE TABLE IF NOT EXISTS ecosystem.people_contributions (
4242
person_id integer NOT NULL REFERENCES ecosystem.people(id) ON DELETE CASCADE,
4343
contribution_id integer NOT NULL REFERENCES ecosystem.contributions(id) ON DELETE CASCADE,
4444
PRIMARY KEY (person_id, contribution_id)
45-
);
45+
);
46+
47+
-- PREPOPULATE ROLES
48+
INSERT INTO ecosystem.roles (name, description) VALUES
49+
('Student', 'Currently enrolled in an academic program'),
50+
('Researcher', 'Conducts academic or applied research'),
51+
('Developer', 'Writes and maintains software code'),
52+
('Postdoc', 'Postdoctoral researcher working on scholarly projects'),
53+
('Research Scientist', 'Professional researcher involved in scientific work'),
54+
ON CONFLICT (name) DO NOTHING;

0 commit comments

Comments
 (0)