Completely remove old hints connected to the execution environment
This commit is contained in:
5
db/migrate/20181127160857_drop_hints.rb
Normal file
5
db/migrate/20181127160857_drop_hints.rb
Normal file
@ -0,0 +1,5 @@
|
||||
class DropHints < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
drop_table :hints
|
||||
end
|
||||
end
|
12
db/schema.rb
12
db/schema.rb
@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2018_11_26_163428) do
|
||||
ActiveRecord::Schema.define(version: 2018_11_27_160857) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
@ -223,16 +223,6 @@ ActiveRecord::Schema.define(version: 2018_11_26_163428) do
|
||||
t.index ["context_id", "context_type"], name: "index_files_on_context_id_and_context_type"
|
||||
end
|
||||
|
||||
create_table "hints", force: :cascade do |t|
|
||||
t.integer "execution_environment_id"
|
||||
t.string "locale", limit: 255
|
||||
t.text "message"
|
||||
t.string "name", limit: 255
|
||||
t.string "regular_expression", limit: 255
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "internal_users", force: :cascade do |t|
|
||||
t.integer "consumer_id"
|
||||
t.string "email", limit: 255
|
||||
|
@ -19,8 +19,5 @@ CodeOcean::Error.create_factories
|
||||
# file types
|
||||
FileType.create_factories
|
||||
|
||||
# hints
|
||||
Hint.create_factories
|
||||
|
||||
# submissions
|
||||
FactoryBot.create(:submission, exercise: @exercises[:fibonacci])
|
||||
|
@ -25,9 +25,6 @@ Exercise.create_factories
|
||||
# file types
|
||||
FileType.create_factories
|
||||
|
||||
# hints
|
||||
Hint.create_factories
|
||||
|
||||
# change all resources' author
|
||||
[ExecutionEnvironment, Exercise, FileType].each do |model|
|
||||
model.update_all(user_id: InternalUser.first.id)
|
||||
|
Reference in New Issue
Block a user