hyperloop
hyperloop copied to clipboard
During the install it should install a migration that created the needed tables
Now when you migrate the database you loose the injected schema.
And missing the tables: hyperloop_connections and hyperloop_queued_messages
It should install these 2 migrations:
class InstallHyperloopConnections < ActiveRecord::Migration[5.2]
def change
create_table :hyperloop_connections do |t|
t.string :channel
t.string :session
t.datetime :created_at
t.datetime :expires_at, index: true
t.datetime :refresh_at
end
create_table :hyperloop_queued_messages do |t|
t.integer :connection_id, index: true
t.text :data
end
end
end
Should there be an index on the channel of session?
Yes Indeed! This will be done when we transition to the new new Hyperstack architecture.
Also a question about the way of installing. Why is this a generate job instead of a normal task like active_storage?
rails active_storage:install # Copy over the migration needed to the application
rails active_storage:install:migrations # Copy migrations from active_storage to application