Skip to content

Commit 84e8201

Browse files
author
John Pinto
committed
Added to models OrgDomain and OrgRor.
Created migration files and updated schema.rb and seeds.rb.
1 parent c2e3cd3 commit 84e8201

6 files changed

Lines changed: 402 additions & 1 deletion

File tree

app/models/org_domain.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# frozen_string_literal: true
2+
class OrgDomain < ApplicationRecord
3+
belongs_to :org
4+
5+
end

app/models/org_ror.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
3+
class OrgRor < ApplicationRecord
4+
belongs_to :org
5+
6+
7+
end
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
class CreateOrgDomains < ActiveRecord::Migration[7.1]
2+
def change
3+
create_table :org_domains do |t|
4+
t.references :org, foreign_key: true, null: false
5+
t.text :domain, null: false
6+
7+
t.timestamps # Automatically adds created_at and updated_at with default non-null constraint.
8+
end
9+
end
10+
end
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
class CreateOrgRors < ActiveRecord::Migration[7.1]
2+
def change
3+
create_table :org_rors do |t|
4+
t.references :org, foreign_key: true, null: false
5+
t.text :ror_id, null: false
6+
7+
t.timestamps # Automatically adds created_at and updated_at with default non-null constraint.
8+
end
9+
end
10+
end
11+
12+
13+

0 commit comments

Comments
 (0)