Skip to content

Conversation

@ypresto
Copy link

@ypresto ypresto commented Mar 17, 2020

(NOTE: This is false by default in activerecord-import)

@coveralls
Copy link

Coverage Status

Coverage remained the same at 97.956% when pulling f67ba67 on ypresto:patch-1 into 07cee9c on activeadmin-plugins:master.

@ypresto
Copy link
Author

ypresto commented Mar 17, 2020

Ah, it is not changeable option.

@ypresto ypresto closed this Mar 17, 2020
@ypresto
Copy link
Author

ypresto commented Mar 17, 2020

I should disable it because my non-primary column has both presence and uniqueness validator.

@ypresto
Copy link
Author

ypresto commented Mar 19, 2020

Finally I decided to prohibit id column in input csv.

before_batch_import: ->(importer) do # https://dev.mysql.com/doc/refman/8.0/en/insert-on-duplicate.html raise 'Cannot specify id. Use subdomain for update key.' if importer.headers.keys.include?('id')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants