Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add time_spent to UserLevels #31231

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions dashboard/app/models/user_level.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# submitted :boolean
# readonly_answers :boolean
# unlocked_at :datetime
# time_spent :integer
#
# Indexes
#
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddTimeSpentToUserLevels < ActiveRecord::Migration[5.0]
def change
add_column :user_levels, :time_spent, :integer
end
end
3 changes: 2 additions & 1 deletion dashboard/db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20190904030041) do
ActiveRecord::Schema.define(version: 20191011174343) do

create_table "activities", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" do |t|
t.integer "user_id"
Expand Down Expand Up @@ -1444,6 +1444,7 @@
t.boolean "submitted"
t.boolean "readonly_answers"
t.datetime "unlocked_at"
t.integer "time_spent"
t.index ["user_id", "level_id", "script_id"], name: "index_user_levels_on_user_id_and_level_id_and_script_id", unique: true, using: :btree
end

Expand Down