掲示板実装
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / system-test (push) Has been cancelled

This commit is contained in:
2026-02-19 22:30:59 +09:00
parent f25fd6f802
commit bb9ec2df1d
38 changed files with 1711 additions and 13 deletions

View File

@@ -0,0 +1,16 @@
class CreateBoards < ActiveRecord::Migration[8.1]
def change
create_table :boards do |t|
t.integer :game_id, null: false
t.string :board_type, null: false, default: 'negotiation'
t.integer :created_by_participant_id
t.boolean :is_public, null: false, default: false
t.timestamps
end
add_index :boards, :game_id
add_index :boards, :board_type
add_foreign_key :boards, :games
end
end

View File

@@ -0,0 +1,19 @@
class CreateBoardMemberships < ActiveRecord::Migration[8.1]
def change
create_table :board_memberships do |t|
t.integer :board_id, null: false
t.integer :participant_id, null: false
t.datetime :joined_at, null: false
t.datetime :left_at
t.integer :last_read_post_id
t.timestamps
end
add_index :board_memberships, :board_id
add_index :board_memberships, :participant_id
add_index :board_memberships, [ :board_id, :participant_id ], unique: true
add_foreign_key :board_memberships, :boards
add_foreign_key :board_memberships, :participants
end
end

View File

@@ -0,0 +1,17 @@
class CreateBoardPosts < ActiveRecord::Migration[8.1]
def change
create_table :board_posts do |t|
t.integer :board_id, null: false
t.integer :participant_id, null: false
t.text :body, null: false
t.string :phase
t.timestamps
end
add_index :board_posts, :board_id
add_index :board_posts, :participant_id
add_foreign_key :board_posts, :boards
add_foreign_key :board_posts, :participants
end
end

View File

@@ -0,0 +1,17 @@
class CreateBoardProposals < ActiveRecord::Migration[8.1]
def change
create_table :board_proposals do |t|
t.integer :board_id, null: false
t.integer :proposer_participant_id, null: false
t.text :body, null: false
t.string :status, null: false, default: 'pending'
t.timestamps
end
add_index :board_proposals, :board_id
add_index :board_proposals, :proposer_participant_id
add_foreign_key :board_proposals, :boards
add_foreign_key :board_proposals, :participants, column: :proposer_participant_id
end
end

View File

@@ -0,0 +1,13 @@
class CreateSolidCableMessages < ActiveRecord::Migration[7.1]
def change
create_table "solid_cable_messages" do |t|
t.binary "channel", limit: 1024, null: false
t.binary "payload", limit: 536870912, null: false
t.datetime "created_at", null: false
t.integer "channel_hash", limit: 8, null: false
t.index [ "channel" ], name: "index_solid_cable_messages_on_channel"
t.index [ "channel_hash" ], name: "index_solid_cable_messages_on_channel_hash"
t.index [ "created_at" ], name: "index_solid_cable_messages_on_created_at"
end
end
end

View File

@@ -0,0 +1,5 @@
class AddPhaseToBoardProposals < ActiveRecord::Migration[8.1]
def change
add_column :board_proposals, :phase, :string
end
end