{"record":{"id":"3fc669586fd18797","repo":"bensheldon/good_job","slug":"goodjob-has-pending-database-migrations-to-create","errorCode":null,"errorMessage":"GoodJob has pending database migrations. To create the migration files, run:\n    rails generate good_job:update\nTo apply the migration files, run:\n    rails db:migrate","messagePattern":"GoodJob has pending database migrations\\. To create the migration files, run:\n    rails generate good_job:update\nTo apply the migration files, run:\n    rails db:migrate","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/models/good_job/base_record.rb","lineNumber":13,"sourceCode":"# frozen_string_literal: true\n\nmodule GoodJob\n  # Base ActiveRecord class that all GoodJob models inherit from.\n  # Parent class can be configured with +GoodJob.active_record_parent_class+.\n  # @!parse\n  #   class BaseRecord < ActiveRecord::Base; end\n  class BaseRecord < ActiveRecordParentClass\n    self.abstract_class = true\n    self.strict_loading_by_default = false\n\n    def self.migration_pending_warning!\n      GoodJob.deprecator.warn(<<~DEPRECATION)\n        GoodJob has pending database migrations. To create the migration files, run:\n            rails generate good_job:update\n        To apply the migration files, run:\n            rails db:migrate\n      DEPRECATION\n      nil\n    end\n\n    # Checks for whether the schema is up to date.\n    # Can be overriden by child class.\n    # @return [Boolean]\n    def self.migrated?\n      return true if table_exists?\n\n      migration_pending_warning!\n      false\n    end\n","sourceCodeStart":1,"sourceCodeEnd":31,"githubUrl":"https://github.com/bensheldon/good_job/blob/5fcde48f8765e69901ffa9c5a06122b19c73875f/app/models/good_job/base_record.rb#L1-L31","documentation":"Error \"GoodJob has pending database migrations. To create the migration files, run:\n    rails generate good_job:update\nTo apply the migration files, run:\n    rails db:migrate\" thrown in bensheldon/good_job.","triggerScenarios":"Thrown at app/models/good_job/base_record.rb:13 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Generate the pending GoodJob update migrations and apply them.","Run rails generate good_job:update, then rails db:migrate."],"exampleFix":"bin/rails generate good_job:update\nbin/rails db:migrate","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5fcde48f8765e69901ffa9c5a06122b19c73875f","analyzedAt":"2026-08-23T14:55:11.399Z","schemaVersion":2},"datasetVersion":"2026-08-23T16:17:53.355Z"}