Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix style issues.

Pavel Balashoua65da6c74c87
diff --git a/db/migrate/20210331085058_migrate_sessions_unlogged.rb b/db/migrate/20210331085058_migrate_sessions_unlogged.rb
index 844e9464679..1fb026f461a 100644
--- a/db/migrate/20210331085058_migrate_sessions_unlogged.rb
+++ b/db/migrate/20210331085058_migrate_sessions_unlogged.rb
@@ -27,10 +27,10 @@
#++
class MigrateSessionsUnlogged < ActiveRecord::Migration[6.1]
- def change
+ def up
truncate :sessions
- # Set the table to unlogged
+ # Set the table to UNLOGGED
execute <<~SQL.squish
ALTER TABLE "sessions" SET UNLOGGED
SQL
@@ -39,4 +39,13 @@ class MigrateSessionsUnlogged < ActiveRecord::Migration[6.1]
# that now no longer is set by rails
remove_column :sessions, :created_at, null: false
end
+
+ def down
+ # Set the table to LOGGED
+ execute <<~SQL.squish
+ ALTER TABLE "sessions" SET LOGGED
+ SQL
+
+ add_column :sessions, :created_at, :datetime
+ end
end
diff --git a/modules/two_factor_authentication/db/migrate/20120214103300_aggregated_mobile_otp_migrations.rb b/modules/two_factor_authentication/db/migrate/20120214103300_aggregated_mobile_otp_migrations.rb
index 25790e122c5..e5fd024d5ce 100644
--- a/modules/two_factor_authentication/db/migrate/20120214103300_aggregated_mobile_otp_migrations.rb
+++ b/modules/two_factor_authentication/db/migrate/20120214103300_aggregated_mobile_otp_migrations.rb
@@ -26,8 +26,8 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require "#{Rails.root}/db/migrate/migration_utils/migration_squasher"
-require "#{Rails.root}/db/migrate/migration_utils/setting_renamer"
+require Rails.root.join("db/migrate/migration_utils/migration_squasher").to_s
+require Rails.root.join("db/migrate/migration_utils/setting_renamer").to_s
require 'open_project/plugins/migration_mapping'
# This migration aggregates the migrations detailed in MIGRATION_FILES