Upgrade to Rails 7.0 and apply new framework defaults
* Remove `send_stream` method pulled in before upgrading Rails * Remove spring, it is no longer included by default for new apps * Remove deprecated options from environments * Remove old asset paths and workarounds no longer needed * Remove unnecessary `OAUTH_10_SUPPORT` const, LTI still uses OAuth 1.0 * Dump schema with new defaults (and specify precision for timestamps where needed)
This commit is contained in:
![49699333+dependabot[bot]@users.noreply.github.com](/assets/img/avatar_default.png)
committed by
Sebastian Serth

parent
ffe96d9223
commit
90b30e2bf7
@ -0,0 +1,10 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# This migration comes from active_storage (originally 20211119233751)
|
||||
class RemoveNotNullOnActiveStorageBlobsChecksum < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
return unless table_exists?(:active_storage_blobs)
|
||||
|
||||
change_column_null(:active_storage_blobs, :checksum, true)
|
||||
end
|
||||
end
|
57
db/migrate/20221204120508_add_precision_to_timestamps.rb
Normal file
57
db/migrate/20221204120508_add_precision_to_timestamps.rb
Normal file
@ -0,0 +1,57 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AddPrecisionToTimestamps < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
tables = %w[
|
||||
anomaly_notifications
|
||||
codeharbor_links
|
||||
comments
|
||||
consumers
|
||||
error_template_attributes
|
||||
error_templates
|
||||
events
|
||||
execution_environments
|
||||
exercise_collections
|
||||
exercises
|
||||
exercises_proxy_exercises
|
||||
external_users
|
||||
file_templates
|
||||
file_types
|
||||
files
|
||||
internal_users
|
||||
interventions
|
||||
linter_check_runs
|
||||
lti_parameters
|
||||
proxy_exercises
|
||||
remote_evaluation_mappings
|
||||
request_for_comments
|
||||
searches
|
||||
structured_error_attributes
|
||||
structured_errors
|
||||
study_groups
|
||||
submissions
|
||||
subscriptions
|
||||
tags
|
||||
testruns
|
||||
tips
|
||||
user_exercise_feedbacks
|
||||
user_exercise_interventions
|
||||
user_proxy_exercise_exercises
|
||||
]
|
||||
|
||||
tables.each do |table|
|
||||
change_column table, :created_at, :datetime, precision: 6
|
||||
change_column table, :updated_at, :datetime, precision: 6
|
||||
end
|
||||
|
||||
change_column :authentication_tokens, :expire_at, :datetime, precision: 6
|
||||
change_column :community_solution_locks, :locked_until, :datetime, precision: 6
|
||||
change_column :exercises, :submission_deadline, :datetime, precision: 6
|
||||
change_column :exercises, :late_submission_deadline, :datetime, precision: 6
|
||||
change_column :internal_users, :lock_expires_at, :datetime, precision: 6
|
||||
change_column :internal_users, :remember_me_token_expires_at, :datetime, precision: 6
|
||||
change_column :internal_users, :reset_password_token_expires_at, :datetime, precision: 6
|
||||
change_column :internal_users, :reset_password_email_sent_at, :datetime, precision: 6
|
||||
change_column :internal_users, :activation_token_expires_at, :datetime, precision: 6
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user