Create model for candidates with name and description

This commit is contained in:
ricola 2025-04-06 17:04:31 -06:00
parent f7f1807839
commit d6500e013d
6 changed files with 64 additions and 5 deletions

View file

@ -5,7 +5,7 @@ class CreateVotes < ActiveRecord::Migration[7.2]
t.string :title
t.text :description
t.datetime :expire_on
t.timestamps null: false
t.timestamps
end
end
end

View file

@ -0,0 +1,10 @@
class CreateCandidates < ActiveRecord::Migration[7.2]
def change
create_table :candidates do |t|
t.belongs_to :vote
t.string :name
t.text :description
t.timestamps
end
end
end