excid3 / signalman

Development tools for Ruby on Rails
MIT License
105 stars 7 forks source link

Check if the signalman events table exists before trying to insert SQL event #2

Closed afomera closed 1 year ago

afomera commented 1 year ago

So currently on 0.1.0 or main there's an issue when you attempt to install signalman where it attempts to insert the SQL into the signalman_events table before the table is actually created.

You can reproduce this issue with a fresh app; bundle add signalman rails signalman:install:migrations rails db:create db:migrate -> See error

ActiveRecord::StatementInvalid (Could not find table 'signalman_events'):

I don't love having to check if the table exists every time it inserts the SQL statement so if there's a preferred different approach let me know and I can make the adjustment, or feel free to close this in lieu of that fix😊