JavaScript-Driven MySQL Alterations

Заказчик: AI | Опубликовано: 26.02.2026
Бюджет: 250 $

I need a small JavaScript script (Node.js is fine) that connects to my existing MySQL database, runs a set of queries, and updates the table relationships for me. This is strictly a structure-level change: no data retrieval or data manipulation—just altering foreign keys, indexes, or other relationship constraints so the schema matches my new design. Here is what I expect: • A clearly commented .js file that opens the MySQL connection, executes the relationship-update queries, and closes the connection cleanly. • An easy way for me to adjust connection credentials (host, user, password, database) without touching the logic. • Brief instructions on how to run the script from the command line—npm install steps and the exact command. I already have the specific ALTER statements drafted; you’re welcome to refine them if you spot an efficiency or constraint issue. Once your script runs without error and the updated foreign keys show up in INFORMATION_SCHEMA, the job is complete.