mysql-foreign-key-checker
mysql-foreign-key-checker copied to clipboard
Checks a mysql database for foreign keys pointing to missing records.
mysql-foreign-key-checker
Checks a mysql database for foreign keys pointing to missing records.
- Create the
db.ymlfile in the same directory as this script.
host: localhost
port: 3306
username: user
password: pass
database: db_name
- run
ruby ./find-invalid-keys.rb