掲示板実装
This commit is contained in:
17
db/migrate/20260218084851_create_board_posts.rb
Normal file
17
db/migrate/20260218084851_create_board_posts.rb
Normal 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
|
||||
Reference in New Issue
Block a user