mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Eager loading didn't work
This commit is contained in:
2
.github/workflows/migration-tests.yml
vendored
2
.github/workflows/migration-tests.yml
vendored
@@ -112,7 +112,7 @@ jobs:
|
||||
run: rm -rf tmp/app-cache/uploads && cp -r public/uploads tmp/app-cache/uploads
|
||||
|
||||
- name: Check IntermediateDB schema
|
||||
run: DEBUG=1 migrations/bin/cli schema validate
|
||||
run: migrations/bin/cli schema validate
|
||||
|
||||
- name: RSpec
|
||||
run: bin/rspec --default-path migrations/spec
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_relative "../lib/migrations"
|
||||
require_relative "../migrations"
|
||||
|
||||
require "colored2"
|
||||
require "thor"
|
||||
|
||||
@@ -7,21 +7,21 @@ require "active_support"
|
||||
require "active_support/core_ext"
|
||||
require "zeitwerk"
|
||||
|
||||
require_relative "converters"
|
||||
require_relative "lib/converters"
|
||||
|
||||
module Migrations
|
||||
class NoSettingsFound < StandardError
|
||||
end
|
||||
|
||||
def self.root_path
|
||||
@root_path ||= File.expand_path("..", __dir__)
|
||||
@root_path ||= __dir__
|
||||
end
|
||||
|
||||
def self.load_rails_environment(quiet: false)
|
||||
message = "Loading Rails environment ..."
|
||||
message = "Loading Rails environment..."
|
||||
print message if !quiet
|
||||
|
||||
rails_root = File.expand_path("../..", __dir__)
|
||||
rails_root = File.expand_path("..", __dir__)
|
||||
# rubocop:disable Discourse/NoChdir
|
||||
Dir.chdir(rails_root) do
|
||||
begin
|
||||
@@ -3,7 +3,7 @@
|
||||
# we need to require the rails_helper from core to load the Rails environment
|
||||
require_relative "../../spec/rails_helper"
|
||||
|
||||
require_relative "../lib/migrations"
|
||||
require_relative "../migrations"
|
||||
|
||||
::Migrations.configure_zeitwerk
|
||||
::Migrations.enable_i18n
|
||||
|
||||
Reference in New Issue
Block a user