mirror of
https://github.com/projekteuler/projekteuler.git
synced 2026-01-26 18:18:51 +01:00
Show author names in problem and translation views
This commit is contained in:
5
db/migrate/20190204164033_add_author_to_translations.rb
Normal file
5
db/migrate/20190204164033_add_author_to_translations.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddAuthorToTranslations < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_reference :translations, :author, index: true, null: true, foreign_key: {to_table: :users}
|
||||
end
|
||||
end
|
||||
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2019_02_03_164629) do
|
||||
ActiveRecord::Schema.define(version: 2019_02_04_164033) do
|
||||
|
||||
create_table "problems", force: :cascade do |t|
|
||||
t.datetime "created_at"
|
||||
@@ -26,6 +26,8 @@ ActiveRecord::Schema.define(version: 2019_02_03_164629) do
|
||||
t.datetime "updated_at"
|
||||
t.integer "problem_id"
|
||||
t.integer "status", default: 0
|
||||
t.integer "author_id"
|
||||
t.index ["author_id"], name: "index_translations_on_author_id"
|
||||
t.index ["problem_id"], name: "index_translations_on_problem_id"
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user