Skip to content

Commit 26f39f1

Browse files
committed
Schema
1 parent ebf99c2 commit 26f39f1

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

db/schema.rb

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,6 @@
363363
t.datetime "updated_at", null: false
364364
t.text "description"
365365
t.string "target_audience", default: [], array: true
366-
t.string "authors", default: [], array: true
367-
t.string "contributors", default: [], array: true
368366
t.string "licence", default: "notspecified"
369367
t.string "difficulty_level", default: "notspecified"
370368
t.integer "content_provider_id"
@@ -429,6 +427,30 @@
429427
t.index ["term_uri"], name: "index_ontology_term_links_on_term_uri"
430428
end
431429

430+
create_table "people", force: :cascade do |t|
431+
t.string "given_name"
432+
t.string "family_name"
433+
t.string "full_name"
434+
t.string "orcid"
435+
t.bigint "profile_id"
436+
t.datetime "created_at", null: false
437+
t.datetime "updated_at", null: false
438+
t.index ["orcid"], name: "index_people_on_orcid"
439+
t.index ["profile_id"], name: "index_people_on_profile_id"
440+
end
441+
442+
create_table "person_links", force: :cascade do |t|
443+
t.string "resource_type", null: false
444+
t.bigint "resource_id", null: false
445+
t.bigint "person_id", null: false
446+
t.string "role", null: false
447+
t.datetime "created_at", null: false
448+
t.datetime "updated_at", null: false
449+
t.index ["person_id"], name: "index_person_links_on_person_id"
450+
t.index ["resource_type", "resource_id", "person_id", "role"], name: "index_person_links_uniqueness", unique: true
451+
t.index ["resource_type", "resource_id"], name: "index_person_links_on_resource"
452+
end
453+
432454
create_table "profiles", force: :cascade do |t|
433455
t.text "firstname"
434456
t.text "surname"
@@ -666,6 +688,8 @@
666688
add_foreign_key "materials", "users"
667689
add_foreign_key "node_links", "nodes"
668690
add_foreign_key "nodes", "users"
691+
add_foreign_key "people", "profiles"
692+
add_foreign_key "person_links", "people"
669693
add_foreign_key "sources", "content_providers"
670694
add_foreign_key "sources", "users"
671695
add_foreign_key "space_roles", "spaces"

0 commit comments

Comments
 (0)