Add internal title for exercise
The internal title is designed to provide an alternative title for teachers. It is not exposed to learners.
This commit is contained in:
@ -0,0 +1,8 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AddInternalTitleToExercises < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
add_column :exercises, :internal_title, :string
|
||||
add_index :exercises, :internal_title, using: :gin, opclass: :gin_trgm_ops
|
||||
end
|
||||
end
|
@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.0].define(version: 2023_09_20_094122) do
|
||||
ActiveRecord::Schema[7.0].define(version: 2023_10_13_194635) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pg_trgm"
|
||||
enable_extension "pgcrypto"
|
||||
@ -248,8 +248,10 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_20_094122) do
|
||||
t.boolean "unpublished", default: false
|
||||
t.datetime "submission_deadline"
|
||||
t.datetime "late_submission_deadline"
|
||||
t.string "internal_title"
|
||||
t.index ["id"], name: "index_exercises_on_id"
|
||||
t.index ["id"], name: "index_unpublished_exercises", where: "(NOT unpublished)"
|
||||
t.index ["internal_title"], name: "index_exercises_on_internal_title", opclass: :gin_trgm_ops, using: :gin
|
||||
t.index ["title"], name: "index_exercises_on_title", opclass: :gin_trgm_ops, using: :gin
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user