-
Notifications
You must be signed in to change notification settings - Fork 24
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
db:setup fails with ActiveRecord::StatementInvalid: PG::DuplicateObject #22
Comments
I also tried running |
It doesn't look like it is happened because of this gem. Please provide a bare minimum application that is representing that bug. |
I’ll work on preparing that...
Another detail I forgot to include: before installing this gem my migrations created the enum types with raw sql queries. I retroactively replaced them with create create_enum which seemed to work fine as far as generating a proper schema file. But maybe there’s some kind of conflict with the previous implementation
… On Jun 20, 2020, at 5:15 AM, Misha Merkushin ***@***.***> wrote:
It doesn't look like it is happened because of this gem. Please provide a bare minimum application that is representing that bug.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@bibendi I'm seeing the same thing and it happens with any Rails app I've tried that uses the Ruby DSL for the schema. The problem appears to be that |
Adding on, there is support in schema.rb for a
This option isn't documented and isn't set by default, which is in contrast to how ActiveRecord handles |
@nirvdrum, I agree with you. It looks like it needs to be implemented |
Describe the bug
After adding a couple migrations that use
add_enum
I can no longer runrake db:setup
without the following error:To Reproduce
Steps to reproduce the behavior:
gem 'activerecord-postgres_enum'
to Gemfile$ bundle install
add_enum
$ bundle exec rake db:setup
Expected behavior
Command runs without error.
Context (please complete the following information):
Additional context
Ruby version 2.6.3p62
PostgreSQL version 12
The text was updated successfully, but these errors were encountered: