ronin-rb / ronin-app

A local web interface for Ronin.
https://ronin-rb.dev
GNU Affero General Public License v3.0
26 stars 8 forks source link

Add support for switching the database #14

Closed postmodern closed 9 months ago

postmodern commented 1 year ago

Since the app uses ronin-db and [roin-db] supports configuring multiple databases, it should be possible to switch to another database as the app is running. Possibly the current database name would be stored in the session cookie or sent to Sidekiq workers which import data into the database? I'm not sure how we would tell ActiveRecord to use another database, or whether we'd simply call ActiveRecord.establish_connection again to switch to another database?

postmodern commented 11 months ago

The ronin-app command now supports --db and --db-uri options for specifying another database. Does the app really need to change the database while running?

postmodern commented 9 months ago

I don't think it's possible to switch databases while the app (and sidekiq workers) are running. Closing this.