ronin-rb / ronin-db-activerecord

ActiveRecord backend for the Ronin Database
https://ronin-rb.dev
GNU Lesser General Public License v3.0
7 stars 5 forks source link

`URL.import` is not de-duplicating URLs #35

Closed postmodern closed 1 year ago

postmodern commented 1 year ago

URL.import is not de-duplicating URLs that are already in the database. This appears to be due to find_or_create_by() not performing the find() query if one of the attributes is an empty Array. The other reason is that SQL UNIQUE INDEXs are not enforced on columns which allow NULL values.