Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Seed fu, does't recognize schema changes right after migration #78

Open
shemerey opened this issue Aug 21, 2014 · 1 comment
Open

Seed fu, does't recognize schema changes right after migration #78

shemerey opened this issue Aug 21, 2014 · 1 comment

Comments

@shemerey
Copy link

On my current project i've faced interesting bug, basically i have custom rake task to prepare database in development mode

namespace :db do
  task :dance => [:drop, :create, :migrate, :seed_fu]
end

Some times it causes problem like this

NoMethodError: undefined method `customer_code' for #<Company:0x007f8d500a9ad0>

I've fixed it by adding this into my seed file right before seeds for Company model

Company.connection.schema_cache.clear!
Company.reset_column_information

I would like to create PR for this issue, but I have some problems with reproducing it in test environment for gem.

@alexisraca
Copy link

I have an isue where seeding into multiple schemas like:

  • schema_app1
  • schema_app2
  • public

does not respect the schema for tables at schema_app1 and looks for the sequences tables into public schema instead schema_app1 or schema_app2 depending where the table is

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

No branches or pull requests

2 participants