The active record connection adapter should use migrations instead of auto config
還沒有人認領這個 Issue。
評估
研究方向
找出 Connection 資料表的 AutoConfig,以及負責設定的 installer 或 generator。將這些進入點與 issue 中顯示的 migration 進行比較;完成的標準是 installer 透過 migration 新增必要的資料表,而 AutoConfig 不再建立這些資料表。
由索引模型根據 Issue 內容生成。
描述
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
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
hyperstack-org/hyperstack 的其他 Issue
-
enhancement needs doc
難度 2/5 1-3 小時 新手友好度 68/100
hyperstack-org/hyperstack#359 ·
-
難度 2/5 1-3 小時 新手友好度 68/100
hyperstack-org/hyperstack#267 ·
-
難度 5/5 一週以上 新手友好度 25/100
hyperstack-org/hyperstack#457 ·
-
難度 3/5 1-2 天 新手友好度 35/100
hyperstack-org/hyperstack#456 ·
-
難度 5/5 一週以上 新手友好度 15/100
hyperstack-org/hyperstack#455 · 2 則留言 ·
查看 hyperstack-org/hyperstack 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 65/100
-
難度 2/5 1-3 小時 新手友好度 75/100
docToolchain/docToolchain#1705 ·
-
Timezone select lists one option per character; duplicate "Failed" reason; shared tracker popover id 未關閉bug
難度 2/5 1-3 小時 新手友好度 75/100
nightscout/nocturne#1414 ·
-
bug v2
難度 2/5 1-3 小時 新手友好度 75/100
modelcontextprotocol/inspector#2458 · 1 則留言 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
難度 2/5 1-3 小時 新手友好度 70/100
carbon-design-system/ibm-products#9907 ·