Skip to content

Commit

Permalink
Rails 7 doesn't like having data_migrations have an id column
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonfb committed Nov 17, 2021
1 parent 5d29387 commit 8fd7f0f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class CreateDataMigrations < ActiveRecord::Migration[5.2]
class CreateDataMigrations < ActiveRecord::Migration[<%= Gem.loaded_specs['activerecord'].version.to_s.split(".")[0..1].join(".") %>]
def self.up
create_table :data_migrations do |t|
create_table :data_migrations, id: false do |t|
t.string :version
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/nonschema_migrations/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module NonSchemaMigrations
VERSION = "5.2"
VERSION = "5.5"
end
2 changes: 1 addition & 1 deletion nonschema_migrations.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ Gem::Specification.new do |s|
---------------------------------------------
MSG

s.add_runtime_dependency 'activerecord', [">= 6.0"]
s.add_runtime_dependency 'activerecord', [">= 7.0", "< 8"]
end

0 comments on commit 8fd7f0f

Please sign in to comment.