Add Language model and LanguageController
This commit is contained in:
1 parent
ed00e69a13
commit
206c4da31f
28 files changed
+298
-18
No files matched your search
@@ -0,0 +1,9 @@
|
||||
class CreateLanguages < ActiveRecord::Migration[7.1]
|
||||
def change
|
||||
create_table :languages do |t|
|
||||
t.string :name
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,17 @@
|
||||
class AddLanguageFields < ActiveRecord::Migration[7.1]
|
||||
def change
|
||||
create_table :language do |t|
|
||||
t.string :name
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
change_table :definitions do |t|
|
||||
t.references :language, null: false, foreign_key: true
|
||||
end
|
||||
|
||||
change_table :part_of_speeches do |t|
|
||||
t.references :language, null: false, foreign_key: true
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user