{"record":{"id":"779c1196e988cb46","repo":"public-activity/public_activity","slug":"warn-table-name-doesn-t-exist-skipping-publi","errorCode":null,"errorMessage":"[WARN] table #{name} doesn't exist. Skipping PublicActivity::Activity#parameters's serialization","messagePattern":"\\[WARN\\] table #(.+?) doesn't exist\\. Skipping PublicActivity::Activity#parameters's serialization","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/public_activity/orm/active_record/activity.rb","lineNumber":47,"sourceCode":"        with_options(optional: true) do\n          # Define ownership to a resource responsible for this activity\n          belongs_to :owner, polymorphic: true\n          # Define ownership to a resource targeted by this activity\n          belongs_to :recipient, polymorphic: true\n        end\n\n        # Serialize parameters Hash\n        begin\n          if table_exists?\n            unless %i[json jsonb hstore].include?(columns_hash['parameters'].type)\n              if ::ActiveRecord.version.release < Gem::Version.new('7.1')\n                serialize :parameters, Hash\n              else\n                serialize :parameters, coder: YAML, type: Hash\n              end\n            end\n          else\n            warn(\"[WARN] table #{name} doesn't exist. Skipping PublicActivity::Activity#parameters's serialization\")\n          end\n        rescue ::ActiveRecord::NoDatabaseError\n          warn(\"[WARN] database doesn't exist. Skipping PublicActivity::Activity#parameters's serialization\")\n        rescue ::ActiveRecord::ConnectionNotEstablished, ::PG::ConnectionBad, Mysql2::Error::ConnectionError\n          warn(\"[WARN] couldn't connect to database. Skipping PublicActivity::Activity#parameters's serialization\")\n        end\n      end\n    end\n  end\nend\n","sourceCodeStart":29,"sourceCodeEnd":58,"githubUrl":"https://github.com/public-activity/public_activity/blob/1f3a5568adcb55317552b7528cc489b8ccbbb306/lib/public_activity/orm/active_record/activity.rb#L29-L58","documentation":"Error \"[WARN] table #{name} doesn't exist. Skipping PublicActivity::Activity#parameters's serialization\" thrown in public-activity/public_activity.","triggerScenarios":"Emitted when the PublicActivity::Activity model class is loaded and table_exists? returns false, so the serializer for the parameters column cannot be configured. Typical during boot before migrations have run (fresh database, db:migrate not yet executed), in rake tasks or console sessions that load the model before the activities table exists, or when the connection points at a schema where the table was renamed or dropped. The warn at lib/public_activity/orm/active_record/activity.rb:47 fires instead of calling serialize, so parameters are not serialized until the app restarts after the table exists.","commonSituations":"See trigger scenarios.","solutions":["Run the PublicActivity migration: rails generate public_activity:migration && rails db:migrate.","Confirm the configured table name matches the migrated table: PublicActivity.config.table_name (default 'activities').","If the model loads before migrations (e.g. during assets:precompile), the warning is harmless; the serialization block is skipped."],"exampleFix":"rails generate public_activity:migration\nrails db:migrate","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1f3a5568adcb55317552b7528cc489b8ccbbb306","analyzedAt":"2026-08-23T14:30:56.210Z","schemaVersion":2},"datasetVersion":"2026-08-23T16:17:53.355Z"}