initial data model implementation
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
class CreateSuggestedMeanings < ActiveRecord::Migration[8.1]
|
||||
def change
|
||||
create_table :suggested_meanings do |t|
|
||||
t.references :entry, null: false, foreign_key: true
|
||||
t.string :language_code, null: false
|
||||
t.string :alternative_translation, null: false
|
||||
t.text :context
|
||||
t.text :reasoning
|
||||
t.string :source
|
||||
t.string :region
|
||||
t.integer :status, null: false, default: 0
|
||||
t.references :submitted_by, null: false, foreign_key: { to_table: :users }
|
||||
t.references :reviewed_by, null: true, foreign_key: { to_table: :users }
|
||||
t.datetime :reviewed_at
|
||||
|
||||
t.index :language_code
|
||||
t.index :status
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user