Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

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

未關閉
#348 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
38/100
Issue 類型
重構
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
rails, ruby
領域
database

研究方向

找出 Connection 資料表的 AutoConfig,以及負責設定的 installer 或 generator。將這些進入點與 issue 中顯示的 migration 進行比較;完成的標準是 installer 透過 migration 新增必要的資料表,而 AutoConfig 不再建立這些資料表。

由索引模型根據 Issue 內容生成。

描述

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

主要語言
JavaScript
星號
538
分支
41
PR 合併指標
30 天內沒有已合併 PR

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

hyperstack-org/hyperstack 的其他 Issue

查看 hyperstack-org/hyperstack 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。