Installing mysql2 gem errors on MacOS Mojave.
Make sure openssl is installed on Mac via Homebrew.
brew install openssl
| -- Get Max ID from table | |
| SELECT MAX(id) FROM table; | |
| -- Get Next ID from table | |
| SELECT nextval('table_id_seq'); | |
| -- Set Next ID Value to MAX ID | |
| SELECT setval('table_id_seq', (SELECT MAX(id) FROM table) + 1); |