Add version identifier to old migrations (required for Rails 5)

This commit is contained in:
Sebastian Serth
2018-11-22 19:05:19 +01:00
parent 0fbbe97ae4
commit 44dc18feb0
125 changed files with 125 additions and 125 deletions

View File

@ -1,4 +1,4 @@
class CreateExercises < ActiveRecord::Migration class CreateExercises < ActiveRecord::Migration[4.2]
def change def change
create_table :exercises do |t| create_table :exercises do |t|
t.text :description t.text :description

View File

@ -1,4 +1,4 @@
class CreateExecutionEnvironments < ActiveRecord::Migration class CreateExecutionEnvironments < ActiveRecord::Migration[4.2]
def change def change
create_table :execution_environments do |t| create_table :execution_environments do |t|
t.string :docker_image t.string :docker_image

View File

@ -1,4 +1,4 @@
class CreateSubmissions < ActiveRecord::Migration class CreateSubmissions < ActiveRecord::Migration[4.2]
def change def change
create_table :submissions do |t| create_table :submissions do |t|
t.text :code t.text :code

View File

@ -1,4 +1,4 @@
class AddReferenceImplementationToExercises < ActiveRecord::Migration class AddReferenceImplementationToExercises < ActiveRecord::Migration[4.2]
def change def change
add_column :exercises, :reference_implementation, :text add_column :exercises, :reference_implementation, :text
end end

View File

@ -1,4 +1,4 @@
class AddIndentSizeToExecutionEnvironments < ActiveRecord::Migration class AddIndentSizeToExecutionEnvironments < ActiveRecord::Migration[4.2]
def change def change
add_column :execution_environments, :indent_size, :integer add_column :execution_environments, :indent_size, :integer
end end

View File

@ -1,4 +1,4 @@
class CreateConsumers < ActiveRecord::Migration class CreateConsumers < ActiveRecord::Migration[4.2]
def change def change
create_table :consumers do |t| create_table :consumers do |t|
t.string :name t.string :name

View File

@ -1,4 +1,4 @@
class CreateUsers < ActiveRecord::Migration class CreateUsers < ActiveRecord::Migration[4.2]
def change def change
create_table :users do |t| create_table :users do |t|
t.belongs_to :consumer t.belongs_to :consumer

View File

@ -1,4 +1,4 @@
class AddOauthKeyToConsumers < ActiveRecord::Migration class AddOauthKeyToConsumers < ActiveRecord::Migration[4.2]
def change def change
add_column :consumers, :oauth_key, :string add_column :consumers, :oauth_key, :string
end end

View File

@ -1,4 +1,4 @@
class AddOauthSecretToConsumers < ActiveRecord::Migration class AddOauthSecretToConsumers < ActiveRecord::Migration[4.2]
def change def change
add_column :consumers, :oauth_secret, :string add_column :consumers, :oauth_secret, :string
end end

View File

@ -1,4 +1,4 @@
class AddRoleToUsers < ActiveRecord::Migration class AddRoleToUsers < ActiveRecord::Migration[4.2]
def change def change
add_column :users, :role, :string add_column :users, :role, :string
end end

View File

@ -1,4 +1,4 @@
class AddUserIdToExercises < ActiveRecord::Migration class AddUserIdToExercises < ActiveRecord::Migration[4.2]
def change def change
add_reference :exercises, :user add_reference :exercises, :user
end end

View File

@ -1,4 +1,4 @@
class AddRunCommandToExecutionEnvironments < ActiveRecord::Migration class AddRunCommandToExecutionEnvironments < ActiveRecord::Migration[4.2]
def change def change
add_column :execution_environments, :run_command, :string add_column :execution_environments, :run_command, :string
end end

View File

@ -1,4 +1,4 @@
class AddTestCommandToExecutionEnvironments < ActiveRecord::Migration class AddTestCommandToExecutionEnvironments < ActiveRecord::Migration[4.2]
def change def change
add_column :execution_environments, :test_command, :string add_column :execution_environments, :test_command, :string
end end

View File

@ -1,4 +1,4 @@
class AddTestCodeToExercises < ActiveRecord::Migration class AddTestCodeToExercises < ActiveRecord::Migration[4.2]
def change def change
add_column :exercises, :test_code, :text add_column :exercises, :test_code, :text
end end

View File

@ -1,4 +1,4 @@
class AddCauseToSubmissions < ActiveRecord::Migration class AddCauseToSubmissions < ActiveRecord::Migration[4.2]
def change def change
add_column :submissions, :cause, :string add_column :submissions, :cause, :string
end end

View File

@ -1,4 +1,4 @@
class AddTemplateTestCodeToExercises < ActiveRecord::Migration class AddTemplateTestCodeToExercises < ActiveRecord::Migration[4.2]
def change def change
add_column :exercises, :template_test_code, :text add_column :exercises, :template_test_code, :text
end end

View File

@ -1,4 +1,4 @@
class AddSupportsUserDefinedTestsToExercises < ActiveRecord::Migration class AddSupportsUserDefinedTestsToExercises < ActiveRecord::Migration[4.2]
def change def change
add_column :exercises, :supports_user_defined_tests, :boolean add_column :exercises, :supports_user_defined_tests, :boolean
end end

View File

@ -1,4 +1,4 @@
class AddTestingFrameworkToExecutionEnvironments < ActiveRecord::Migration class AddTestingFrameworkToExecutionEnvironments < ActiveRecord::Migration[4.2]
def change def change
add_column :execution_environments, :testing_framework, :string add_column :execution_environments, :testing_framework, :string
end end

View File

@ -1,4 +1,4 @@
class CreateFileTypes < ActiveRecord::Migration class CreateFileTypes < ActiveRecord::Migration[4.2]
def change def change
create_table :file_types do |t| create_table :file_types do |t|
t.string :editor_mode t.string :editor_mode

View File

@ -1,4 +1,4 @@
class CreateFiles < ActiveRecord::Migration class CreateFiles < ActiveRecord::Migration[4.2]
def change def change
create_table :files do |t| create_table :files do |t|
t.text :content t.text :content

View File

@ -1,4 +1,4 @@
class RemoveFileTypeRelatedColumnsFromExecutionEnvironments < ActiveRecord::Migration class RemoveFileTypeRelatedColumnsFromExecutionEnvironments < ActiveRecord::Migration[4.2]
def change def change
remove_column :execution_environments, :editor_mode, :string remove_column :execution_environments, :editor_mode, :string
remove_column :execution_environments, :file_extension, :string remove_column :execution_environments, :file_extension, :string

View File

@ -1,4 +1,4 @@
class RemoveFileRelatedColumnsFromExercises < ActiveRecord::Migration class RemoveFileRelatedColumnsFromExercises < ActiveRecord::Migration[4.2]
def change def change
remove_column :exercises, :reference_implementation, :text remove_column :exercises, :reference_implementation, :text
remove_column :exercises, :supports_user_defined_tests, :boolean remove_column :exercises, :supports_user_defined_tests, :boolean

View File

@ -1,4 +1,4 @@
class RemoveCodeFromSubmissions < ActiveRecord::Migration class RemoveCodeFromSubmissions < ActiveRecord::Migration[4.2]
def change def change
remove_column :submissions, :code, :text remove_column :submissions, :code, :text
end end

View File

@ -1,4 +1,4 @@
class AddInstructionsToExercises < ActiveRecord::Migration class AddInstructionsToExercises < ActiveRecord::Migration[4.2]
def change def change
add_column :exercises, :instructions, :text add_column :exercises, :instructions, :text
end end

View File

@ -1,4 +1,4 @@
class AddPublishedToExercises < ActiveRecord::Migration class AddPublishedToExercises < ActiveRecord::Migration[4.2]
def change def change
add_column :exercises, :published, :boolean add_column :exercises, :published, :boolean
end end

View File

@ -1,4 +1,4 @@
class AddExecutableToFileTypes < ActiveRecord::Migration class AddExecutableToFileTypes < ActiveRecord::Migration[4.2]
def change def change
add_column :file_types, :executable, :boolean add_column :file_types, :executable, :boolean
end end

View File

@ -1,4 +1,4 @@
class AddRenderableToFileTypes < ActiveRecord::Migration class AddRenderableToFileTypes < ActiveRecord::Migration[4.2]
def change def change
add_column :file_types, :renderable, :boolean add_column :file_types, :renderable, :boolean
end end

View File

@ -1,4 +1,4 @@
class CreateExternalUsers < ActiveRecord::Migration class CreateExternalUsers < ActiveRecord::Migration[4.2]
def change def change
create_table :external_users do |t| create_table :external_users do |t|
t.belongs_to :consumer t.belongs_to :consumer

View File

@ -1,4 +1,4 @@
class CreateInternalUsers < ActiveRecord::Migration class CreateInternalUsers < ActiveRecord::Migration[4.2]
def change def change
create_table :internal_users do |t| create_table :internal_users do |t|
t.belongs_to :consumer t.belongs_to :consumer

View File

@ -1,4 +1,4 @@
class DropUsers < ActiveRecord::Migration class DropUsers < ActiveRecord::Migration[4.2]
def change def change
drop_table :users drop_table :users
end end

View File

@ -1,4 +1,4 @@
class AddUserTypeToExercises < ActiveRecord::Migration class AddUserTypeToExercises < ActiveRecord::Migration[4.2]
def change def change
add_column :exercises, :user_type, :string add_column :exercises, :user_type, :string
end end

View File

@ -1,4 +1,4 @@
class AddUserTypeToFileTypes < ActiveRecord::Migration class AddUserTypeToFileTypes < ActiveRecord::Migration[4.2]
def change def change
add_column :file_types, :user_type, :string add_column :file_types, :user_type, :string
end end

View File

@ -1,4 +1,4 @@
class AddUserTypeToSubmissions < ActiveRecord::Migration class AddUserTypeToSubmissions < ActiveRecord::Migration[4.2]
def change def change
add_column :submissions, :user_type, :string add_column :submissions, :user_type, :string
end end

View File

@ -1,4 +1,4 @@
class SorceryCore < ActiveRecord::Migration class SorceryCore < ActiveRecord::Migration[4.2]
def change def change
InternalUser.delete_all InternalUser.delete_all
add_column :internal_users, :crypted_password, :string, null: false add_column :internal_users, :crypted_password, :string, null: false

View File

@ -1,4 +1,4 @@
class SorceryBruteForceProtection < ActiveRecord::Migration class SorceryBruteForceProtection < ActiveRecord::Migration[4.2]
def change def change
add_column :internal_users, :failed_logins_count, :integer, default: 0 add_column :internal_users, :failed_logins_count, :integer, default: 0
add_column :internal_users, :lock_expires_at, :datetime, default: nil add_column :internal_users, :lock_expires_at, :datetime, default: nil

View File

@ -1,4 +1,4 @@
class SorceryRememberMe < ActiveRecord::Migration class SorceryRememberMe < ActiveRecord::Migration[4.2]
def change def change
add_column :internal_users, :remember_me_token, :string, default: nil add_column :internal_users, :remember_me_token, :string, default: nil
add_column :internal_users, :remember_me_token_expires_at, :datetime, default: nil add_column :internal_users, :remember_me_token_expires_at, :datetime, default: nil

View File

@ -1,4 +1,4 @@
class SorceryResetPassword < ActiveRecord::Migration class SorceryResetPassword < ActiveRecord::Migration[4.2]
def change def change
add_column :internal_users, :reset_password_token, :string, default: nil add_column :internal_users, :reset_password_token, :string, default: nil
add_column :internal_users, :reset_password_token_expires_at, :datetime, default: nil add_column :internal_users, :reset_password_token_expires_at, :datetime, default: nil

View File

@ -1,4 +1,4 @@
class SorceryUserActivation < ActiveRecord::Migration class SorceryUserActivation < ActiveRecord::Migration[4.2]
def change def change
add_column :internal_users, :activation_state, :string, default: nil add_column :internal_users, :activation_state, :string, default: nil
add_column :internal_users, :activation_token, :string, default: nil add_column :internal_users, :activation_token, :string, default: nil

View File

@ -1,4 +1,4 @@
class AddBinaryToFileTypes < ActiveRecord::Migration class AddBinaryToFileTypes < ActiveRecord::Migration[4.2]
def change def change
add_column :file_types, :binary, :boolean add_column :file_types, :binary, :boolean
end end

View File

@ -1,4 +1,4 @@
class AddNativeFileToFiles < ActiveRecord::Migration class AddNativeFileToFiles < ActiveRecord::Migration[4.2]
def change def change
add_column :files, :native_file, :string add_column :files, :native_file, :string
end end

View File

@ -1,4 +1,4 @@
class CreateHints < ActiveRecord::Migration class CreateHints < ActiveRecord::Migration[4.2]
def change def change
create_table :hints do |t| create_table :hints do |t|
t.belongs_to :execution_environment t.belongs_to :execution_environment

View File

@ -1,4 +1,4 @@
class RemoveNotNullConstraintsFromInternalUsers < ActiveRecord::Migration class RemoveNotNullConstraintsFromInternalUsers < ActiveRecord::Migration[4.2]
def change def change
change_column_null(:internal_users, :crypted_password, true) change_column_null(:internal_users, :crypted_password, true)
change_column_null(:internal_users, :salt, true) change_column_null(:internal_users, :salt, true)

View File

@ -1,4 +1,4 @@
class CreateErrors < ActiveRecord::Migration class CreateErrors < ActiveRecord::Migration[4.2]
def change def change
create_table :errors do |t| create_table :errors do |t|
t.belongs_to :execution_environment t.belongs_to :execution_environment

View File

@ -1,4 +1,4 @@
class AddTokenToExercises < ActiveRecord::Migration class AddTokenToExercises < ActiveRecord::Migration[4.2]
def change def change
add_column :exercises, :token, :string add_column :exercises, :token, :string
end end

View File

@ -1,4 +1,4 @@
class AddFileIdToExercises < ActiveRecord::Migration class AddFileIdToExercises < ActiveRecord::Migration[4.2]
def change def change
add_reference :exercises, :file add_reference :exercises, :file
end end

View File

@ -1,4 +1,4 @@
class AddRoleToFiles < ActiveRecord::Migration class AddRoleToFiles < ActiveRecord::Migration[4.2]
def change def change
add_column :files, :role, :string add_column :files, :role, :string
end end

View File

@ -1,4 +1,4 @@
class RemoveFileIdFromExercises < ActiveRecord::Migration class RemoveFileIdFromExercises < ActiveRecord::Migration[4.2]
def change def change
remove_reference :exercises, :file remove_reference :exercises, :file
end end

View File

@ -1,4 +1,4 @@
class AddHashedContentToFiles < ActiveRecord::Migration class AddHashedContentToFiles < ActiveRecord::Migration[4.2]
def change def change
add_column :files, :hashed_content, :string add_column :files, :hashed_content, :string

View File

@ -1,4 +1,4 @@
class AddFeedbackMessageToFiles < ActiveRecord::Migration class AddFeedbackMessageToFiles < ActiveRecord::Migration[4.2]
def change def change
add_column :files, :feedback_message, :string add_column :files, :feedback_message, :string
end end

View File

@ -1,4 +1,4 @@
class AddWeightToFiles < ActiveRecord::Migration class AddWeightToFiles < ActiveRecord::Migration[4.2]
def change def change
add_column :files, :weight, :float add_column :files, :weight, :float
end end

View File

@ -1,4 +1,4 @@
class AddHelpToExecutionEnvironments < ActiveRecord::Migration class AddHelpToExecutionEnvironments < ActiveRecord::Migration[4.2]
def change def change
add_column :execution_environments, :help, :text add_column :execution_environments, :help, :text
end end

View File

@ -1,4 +1,4 @@
class AddExposedPortsToExecutionEnvironments < ActiveRecord::Migration class AddExposedPortsToExecutionEnvironments < ActiveRecord::Migration[4.2]
def change def change
add_column :execution_environments, :exposed_ports, :string add_column :execution_environments, :exposed_ports, :string
end end

View File

@ -1,4 +1,4 @@
class AddPermittedExecutionTimeToExecutionEnvironments < ActiveRecord::Migration class AddPermittedExecutionTimeToExecutionEnvironments < ActiveRecord::Migration[4.2]
def change def change
add_column :execution_environments, :permitted_execution_time, :integer add_column :execution_environments, :permitted_execution_time, :integer
end end

View File

@ -1,4 +1,4 @@
class AddUserIdAndUserTypeToExecutionEnvironments < ActiveRecord::Migration class AddUserIdAndUserTypeToExecutionEnvironments < ActiveRecord::Migration[4.2]
def change def change
add_reference :execution_environments, :user add_reference :execution_environments, :user
add_column :execution_environments, :user_type, :string add_column :execution_environments, :user_type, :string

View File

@ -1,4 +1,4 @@
class RenamePublishedToPublic < ActiveRecord::Migration class RenamePublishedToPublic < ActiveRecord::Migration[4.2]
def change def change
rename_column :exercises, :published, :public rename_column :exercises, :published, :public
end end

View File

@ -1,4 +1,4 @@
class AddPathToFiles < ActiveRecord::Migration class AddPathToFiles < ActiveRecord::Migration[4.2]
def change def change
add_column :files, :path, :string add_column :files, :path, :string
end end

View File

@ -1,4 +1,4 @@
class CreateComments < ActiveRecord::Migration class CreateComments < ActiveRecord::Migration[4.2]
def change def change
create_table :comments do |t| create_table :comments do |t|
t.references :user, index: true t.references :user, index: true

View File

@ -1,4 +1,4 @@
class CreateTeams < ActiveRecord::Migration class CreateTeams < ActiveRecord::Migration[4.2]
def change def change
create_table :teams do |t| create_table :teams do |t|
t.string :name t.string :name

View File

@ -1,4 +1,4 @@
class CreateInternalUsersTeams < ActiveRecord::Migration class CreateInternalUsersTeams < ActiveRecord::Migration[4.2]
def change def change
create_table :internal_users_teams do |t| create_table :internal_users_teams do |t|
t.belongs_to :internal_user, index: true t.belongs_to :internal_user, index: true

View File

@ -1,4 +1,4 @@
class AddTeamIdToExercises < ActiveRecord::Migration class AddTeamIdToExercises < ActiveRecord::Migration[4.2]
def change def change
add_reference :exercises, :team add_reference :exercises, :team
end end

View File

@ -1,4 +1,4 @@
class AddPoolSizeToExecutionEnvironments < ActiveRecord::Migration class AddPoolSizeToExecutionEnvironments < ActiveRecord::Migration[4.2]
def change def change
add_column :execution_environments, :pool_size, :integer add_column :execution_environments, :pool_size, :integer

View File

@ -1,4 +1,4 @@
class AddFileTypeIdToExecutionEnvironments < ActiveRecord::Migration class AddFileTypeIdToExecutionEnvironments < ActiveRecord::Migration[4.2]
def change def change
add_reference :execution_environments, :file_type add_reference :execution_environments, :file_type
end end

View File

@ -1,4 +1,4 @@
class AddMemoryLimitToExecutionEnvironments < ActiveRecord::Migration class AddMemoryLimitToExecutionEnvironments < ActiveRecord::Migration[4.2]
def change def change
add_column :execution_environments, :memory_limit, :integer add_column :execution_environments, :memory_limit, :integer

View File

@ -1,4 +1,4 @@
class AddNetworkEnabledToExecutionEnvironments < ActiveRecord::Migration class AddNetworkEnabledToExecutionEnvironments < ActiveRecord::Migration[4.2]
def change def change
add_column :execution_environments, :network_enabled, :boolean add_column :execution_environments, :network_enabled, :boolean

View File

@ -1,4 +1,4 @@
class CreateRequestForComments < ActiveRecord::Migration class CreateRequestForComments < ActiveRecord::Migration[4.2]
def change def change
create_table :request_for_comments do |t| create_table :request_for_comments do |t|
t.integer :requestorid, :null => false t.integer :requestorid, :null => false

View File

@ -1,4 +1,4 @@
class AddSubmissionToError < ActiveRecord::Migration class AddSubmissionToError < ActiveRecord::Migration[4.2]
def change def change
add_reference :errors, :submission, index: true add_reference :errors, :submission, index: true
end end

View File

@ -1,4 +1,4 @@
class AddFileIndexToFiles < ActiveRecord::Migration class AddFileIndexToFiles < ActiveRecord::Migration[4.2]
def change def change
add_index(:files, [:context_id, :context_type]) add_index(:files, [:context_id, :context_type])
end end

View File

@ -1,4 +1,4 @@
class AddUserTypeToRequestForComments < ActiveRecord::Migration class AddUserTypeToRequestForComments < ActiveRecord::Migration[4.2]
def change def change
add_column :request_for_comments, :user_type, :string add_column :request_for_comments, :user_type, :string
end end

View File

@ -1,4 +1,4 @@
class CorrectColumnNames < ActiveRecord::Migration class CorrectColumnNames < ActiveRecord::Migration[4.2]
def change def change
rename_column :request_for_comments, :requestorid, :requestor_user_id rename_column :request_for_comments, :requestorid, :requestor_user_id
rename_column :request_for_comments, :exerciseid, :exercise_id rename_column :request_for_comments, :exerciseid, :exercise_id

View File

@ -1,4 +1,4 @@
class RemoveRequestorFromRequestForComments < ActiveRecord::Migration class RemoveRequestorFromRequestForComments < ActiveRecord::Migration[4.2]
def change def change
rename_column :request_for_comments, :requestor_user_id, :user_id rename_column :request_for_comments, :requestor_user_id, :user_id
end end

View File

@ -1,4 +1,4 @@
class AddHideFileTreeToExercises < ActiveRecord::Migration class AddHideFileTreeToExercises < ActiveRecord::Migration[4.2]
def change def change
add_column :exercises, :hide_file_tree, :boolean add_column :exercises, :hide_file_tree, :boolean
end end

View File

@ -1,4 +1,4 @@
class CreateCodeHarborLinks < ActiveRecord::Migration class CreateCodeHarborLinks < ActiveRecord::Migration[4.2]
def change def change
create_table :code_harbor_links do |t| create_table :code_harbor_links do |t|
t.string :oauth2token t.string :oauth2token

View File

@ -1,4 +1,4 @@
class AddUserToCodeHarborLink < ActiveRecord::Migration class AddUserToCodeHarborLink < ActiveRecord::Migration[4.2]
def change def change
add_reference :code_harbor_links, :user, polymorphic: true, index: true add_reference :code_harbor_links, :user, polymorphic: true, index: true
end end

View File

@ -1,4 +1,4 @@
class CreateTestruns < ActiveRecord::Migration class CreateTestruns < ActiveRecord::Migration[4.2]
def change def change
create_table :testruns do |t| create_table :testruns do |t|
t.boolean :passed t.boolean :passed

View File

@ -1,4 +1,4 @@
class AddQuestionToRequestForComments < ActiveRecord::Migration class AddQuestionToRequestForComments < ActiveRecord::Migration[4.2]
def change def change
add_column :request_for_comments, :question, :text add_column :request_for_comments, :question, :text
end end

View File

@ -1,4 +1,4 @@
class AddAllowFileCreationToExercises < ActiveRecord::Migration class AddAllowFileCreationToExercises < ActiveRecord::Migration[4.2]
def change def change
add_column :exercises, :allow_file_creation, :boolean add_column :exercises, :allow_file_creation, :boolean
end end

View File

@ -1,4 +1,4 @@
class ChangeCommentTextAttributeToTextDatatype < ActiveRecord::Migration class ChangeCommentTextAttributeToTextDatatype < ActiveRecord::Migration[4.2]
def up def up
change_column :comments, :text, :text change_column :comments, :text, :text
end end

View File

@ -1,4 +1,4 @@
class CreateFileTemplates < ActiveRecord::Migration class CreateFileTemplates < ActiveRecord::Migration[4.2]
def change def change
create_table :file_templates do |t| create_table :file_templates do |t|
t.string :name t.string :name

View File

@ -1,4 +1,4 @@
class AddFileTemplateToFile < ActiveRecord::Migration class AddFileTemplateToFile < ActiveRecord::Migration[4.2]
def change def change
add_reference :files, :file_template add_reference :files, :file_template
end end

View File

@ -1,4 +1,4 @@
class AddSolvedToRequestForComments < ActiveRecord::Migration class AddSolvedToRequestForComments < ActiveRecord::Migration[4.2]
def change def change
add_column :request_for_comments, :solved, :boolean add_column :request_for_comments, :solved, :boolean
end end

View File

@ -1,4 +1,4 @@
class AddSubmissionToRequestForComments < ActiveRecord::Migration class AddSubmissionToRequestForComments < ActiveRecord::Migration[4.2]
def change def change
add_reference :request_for_comments, :submission add_reference :request_for_comments, :submission
end end

View File

@ -1,4 +1,4 @@
class RemoveRequestedAtFromRequestForComments < ActiveRecord::Migration class RemoveRequestedAtFromRequestForComments < ActiveRecord::Migration[4.2]
def change def change
remove_column :request_for_comments, :requested_at remove_column :request_for_comments, :requested_at
end end

View File

@ -1,4 +1,4 @@
class RemoveTeams < ActiveRecord::Migration class RemoveTeams < ActiveRecord::Migration[4.2]
def change def change
remove_reference :exercises, :team remove_reference :exercises, :team
drop_table :teams drop_table :teams

View File

@ -1,4 +1,4 @@
class AddAllowAutoCompletionToExercises < ActiveRecord::Migration class AddAllowAutoCompletionToExercises < ActiveRecord::Migration[4.2]
def change def change
add_column :exercises, :allow_auto_completion, :boolean, default: false add_column :exercises, :allow_auto_completion, :boolean, default: false
end end

View File

@ -1,4 +1,4 @@
class CreateLtiParameters < ActiveRecord::Migration class CreateLtiParameters < ActiveRecord::Migration[4.2]
def change def change
create_table :lti_parameters do |t| create_table :lti_parameters do |t|
t.belongs_to :external_users t.belongs_to :external_users

View File

@ -1,4 +1,4 @@
class CreateRemoteEvaluationMappings < ActiveRecord::Migration class CreateRemoteEvaluationMappings < ActiveRecord::Migration[4.2]
def change def change
create_table :remote_evaluation_mappings do |t| create_table :remote_evaluation_mappings do |t|
t.integer "user_id", null: false t.integer "user_id", null: false

View File

@ -1,4 +1,4 @@
class CreateExerciseCollections < ActiveRecord::Migration class CreateExerciseCollections < ActiveRecord::Migration[4.2]
def change def change
create_table :exercise_collections do |t| create_table :exercise_collections do |t|
t.string :name t.string :name

View File

@ -1,4 +1,4 @@
class CreateProxyExercises < ActiveRecord::Migration class CreateProxyExercises < ActiveRecord::Migration[4.2]
def change def change
create_table :proxy_exercises do |t| create_table :proxy_exercises do |t|
t.string :title t.string :title

View File

@ -1,4 +1,4 @@
class CreateInterventions < ActiveRecord::Migration class CreateInterventions < ActiveRecord::Migration[4.2]
def change def change
create_table :user_exercise_interventions do |t| create_table :user_exercise_interventions do |t|
t.belongs_to :user, polymorphic: true t.belongs_to :user, polymorphic: true

View File

@ -1,4 +1,4 @@
class AddTags < ActiveRecord::Migration class AddTags < ActiveRecord::Migration[4.2]
def change def change
add_column :exercises, :expected_worktime_seconds, :integer, default: 60 add_column :exercises, :expected_worktime_seconds, :integer, default: 60

View File

@ -1,4 +1,4 @@
class AddUserFeedback < ActiveRecord::Migration class AddUserFeedback < ActiveRecord::Migration[4.2]
def change def change
create_table :user_exercise_feedbacks do |t| create_table :user_exercise_feedbacks do |t|
t.belongs_to :exercise, null: false t.belongs_to :exercise, null: false

View File

@ -1,4 +1,4 @@
class AddSearch < ActiveRecord::Migration class AddSearch < ActiveRecord::Migration[4.2]
def change def change
create_table :searches do |t| create_table :searches do |t|
t.belongs_to :exercise, null: false t.belongs_to :exercise, null: false

View File

@ -1,4 +1,4 @@
class AddReasonToUserProxyExerciseExercise < ActiveRecord::Migration class AddReasonToUserProxyExerciseExercise < ActiveRecord::Migration[4.2]
def change def change
change_table :user_proxy_exercise_exercises do |t| change_table :user_proxy_exercise_exercises do |t|
t.string :reason t.string :reason

View File

@ -1,4 +1,4 @@
class AddIndexToSubmissions < ActiveRecord::Migration class AddIndexToSubmissions < ActiveRecord::Migration[4.2]
def change def change
add_index :submissions, :exercise_id add_index :submissions, :exercise_id
add_index :submissions, :user_id add_index :submissions, :user_id

View File

@ -1,4 +1,4 @@
class SetDefaultForRequestForCommentSolved < ActiveRecord::Migration class SetDefaultForRequestForCommentSolved < ActiveRecord::Migration[4.2]
def change def change
change_column_default :request_for_comments, :solved, false change_column_default :request_for_comments, :solved, false
RequestForComment.where(solved: nil).update_all(solved: false) RequestForComment.where(solved: nil).update_all(solved: false)

View File

@ -1,4 +1,4 @@
class ImproveUserFeedback < ActiveRecord::Migration class ImproveUserFeedback < ActiveRecord::Migration[4.2]
def change def change
add_column :user_exercise_feedbacks, :user_estimated_worktime, :integer add_column :user_exercise_feedbacks, :user_estimated_worktime, :integer
end end

View File

@ -1,4 +1,4 @@
class AddThankYouNoteToRequestForComments < ActiveRecord::Migration class AddThankYouNoteToRequestForComments < ActiveRecord::Migration[4.2]
def change def change
add_column :request_for_comments, :thank_you_note, :text add_column :request_for_comments, :thank_you_note, :text
end end

View File

@ -1,4 +1,4 @@
class CreateErrorTemplates < ActiveRecord::Migration class CreateErrorTemplates < ActiveRecord::Migration[4.2]
def change def change
create_table :error_templates do |t| create_table :error_templates do |t|
t.belongs_to :execution_environment t.belongs_to :execution_environment

View File

@ -1,4 +1,4 @@
class CreateErrorTemplateAttributes < ActiveRecord::Migration class CreateErrorTemplateAttributes < ActiveRecord::Migration[4.2]
def change def change
create_table :error_template_attributes do |t| create_table :error_template_attributes do |t|
t.belongs_to :error_template t.belongs_to :error_template

View File

@ -1,4 +1,4 @@
class CreateStructuredErrors < ActiveRecord::Migration class CreateStructuredErrors < ActiveRecord::Migration[4.2]
def change def change
create_table :structured_errors do |t| create_table :structured_errors do |t|
t.references :error_template t.references :error_template

Some files were not shown because too many files have changed in this diff Show More