Add dictionary ingest and view
Dictionary json ingest to database, view populated with database contents
This commit is contained in:
9
db/migrate/20231013015428_create_words.rb
Normal file
9
db/migrate/20231013015428_create_words.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class CreateWords < ActiveRecord::Migration[7.1]
|
||||
def change
|
||||
create_table :words do |t|
|
||||
t.string :word
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
11
db/migrate/20231013015524_create_definitions.rb
Normal file
11
db/migrate/20231013015524_create_definitions.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class CreateDefinitions < ActiveRecord::Migration[7.1]
|
||||
def change
|
||||
create_table :definitions do |t|
|
||||
t.string :pos
|
||||
t.string :definition
|
||||
t.references :word, null: false, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user