You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect the Cop to not flag a correct migration as "wrong"
Actual behavior
The cop is currently flagging all migrations
Steps to reproduce the problem
# frozen_string_literal: true
# This migration removes the ActiveStorage Blob tables.
class RemoveActiveStorageBlobs < ::ActiveRecord::Migration[6.1]
# Runs the migration in the correct direction
def change
drop_table :active_storage_blobs do |t|
t.string :key, null: false
t.string :filename, null: false
t.string :content_type
t.text :metadata
t.bigint :byte_size, null: false
t.string :checksum, null: false
t.datetime :created_at, null: false
t.index :key, unique: true
end
end
end
This is currently flagged:
db/migrate/20210513071056_remove_active_storage_blobs.rb:4:1: E: Rails/ReversibleMigrationMethodDefinition: Migrations must contain either a change method, or both an up and a down method.
class RemoveActiveStorageBlobs < ::ActiveRecord::Migration[6.1] ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuboCop version
Include the output of rubocop -V or bundle exec rubocop -V if using Bundler. Here's an example:
You can see extension cop versions (e.g. rubocop-rails, rubocop-performance, and others) output by rubocop -V,
include them as well. Here's an example:
Expected behavior
I expect the Cop to not flag a correct migration as "wrong"
Actual behavior
The cop is currently flagging all migrations
Steps to reproduce the problem
This is currently flagged:
RuboCop version
Include the output of
rubocop -V
orbundle exec rubocop -V
if using Bundler. Here's an example:You can see extension cop versions (e.g. rubocop-rails, rubocop-performance, and others) output by rubocop -V,
include them as well. Here's an example:
The text was updated successfully, but these errors were encountered: