Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Auto-generated seeds.rb with empty hash #51

Open
vill opened this issue Jan 11, 2017 · 3 comments
Open

Auto-generated seeds.rb with empty hash #51

vill opened this issue Jan 11, 2017 · 3 comments
Assignees
Labels

Comments

@vill
Copy link
Contributor

vill commented Jan 11, 2017

Hi there.

Ruby 2.3.1p112
Rails 5.0.1
seed_migration 1.2.2
# db/data/20170111085301_add_foo_bar.rb

class AddFooBar < SeedMigration::Migration
  def up
    Foo::Bar.create!(name: 'Name 1')
  end

  def down
    Foo::Bar.find_by!(name: 'Name 1').destroy
  end
end

If I set extend_native_migration_task = true and run rails db:migrate, then I get the seeds.rb with the following content:

ActiveRecord::Base.transaction do

  Foo::Bar.create!({})

  ActiveRecord::Base.connection.reset_pk_sequence!('foo_bars')
end

SeedMigration::Migrator.bootstrap(20170111095343)
@pjambet pjambet added the bug label Jun 14, 2017
@pjambet
Copy link
Contributor

pjambet commented Jun 14, 2017

Hi,

Sorry for the late reply, I don't exactly know what I changed but I apparently muted the notifications from this repo by mistake and didn't notice new issues opened in the last 6 months. Sorry about that.

Thanks for the bug report. I can't promise that I'll have time to reproduce and fix it (but I'll try), but feel free to open a PR if you want to try to fix the bug. I'll happily review it.

@ain
Copy link

ain commented Jul 28, 2017

I can also confirm the issue is currently there in 1.2.2, contradicting with README.

@djones
Copy link

djones commented Aug 9, 2017

Also confirming we're getting the same bug on 1.2.2

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants