1. Navigate to your rails project folder using your command prompt. type in (cd your_path_ directory)
2. when you are in the Rails project directory, run the command.
The Rails Console will now open
3.type in the below code in the console
ActiveRecord::Base.connection.execute(‘put your SQL here’)