The active record connection adapter should use migrations instead of auto config

Abierto
#348 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
38/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
rails, ruby
Área
database

Línea de trabajo

Localiza la AutoConfig de la tabla Connection y el installer o generador responsable de la configuración. Compara esos puntos de entrada con la migración mostrada en el issue; se considera terminado cuando el installer añade las tablas necesarias mediante una migración y AutoConfig deja de crearlas.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement

The Connection table AutoConfig keeps causing people problems.

This should be done via a migration that is added by the installer.

In the meantime you can easily turn off the autoconfig by adding this line to the end of your hyperstack.rb initializier:

def (Hyperstack::Connection).build_tables?; false; end

This will stop AutoConfig from building the tables, and the whole connection and broadcast mechanism will just not work (but will cause no problems) until the tables exist from the migration.

The migration would look like this:

class AddHyperstackTables < ActiveRecord::Migration[5.2]
  def change
    create_table "hyperstack_connections", force: :cascade do |t|
      t.string "channel"
      t.string "session"
      t.datetime "created_at"
      t.datetime "expires_at"
      t.datetime "refresh_at"
    end

    create_table "hyperstack_queued_messages", force: :cascade do |t|
      t.text "data"
      t.integer "connection_id"
    end
  end
end

Here is some info on creating the migration from the generator:

https://api.rubyonrails.org/classes/Rails/Generators/Migration.html

Lenguaje dominante
JavaScript
Estrellas
538
Forks
41
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de hyperstack-org/hyperstack

Todos los issues de hyperstack-org/hyperstack

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.