Skip to content
This repository has been archived by the owner on Oct 19, 2018. It is now read-only.

During the install it should install a migration that created the needed tables #24

Open
johansmitsnl opened this issue Aug 6, 2018 · 2 comments

Comments

@johansmitsnl
Copy link
Contributor

johansmitsnl commented Aug 6, 2018

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?

@catmando catmando added this to the Release 0.15 milestone Aug 7, 2018
@catmando
Copy link
Contributor

catmando commented Aug 7, 2018

Yes Indeed! This will be done when we transition to the new new Hyperstack architecture.

@johansmitsnl
Copy link
Contributor Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants