diff --git a/db/migrate/20250322172051_add_vote_to_ratings.rb b/db/migrate/20250322172051_add_vote_to_ratings.rb new file mode 100644 index 0000000..c5f6518 --- /dev/null +++ b/db/migrate/20250322172051_add_vote_to_ratings.rb @@ -0,0 +1,5 @@ +class AddVoteToRatings < ActiveRecord::Migration[7.2] + def change + add_reference :ratings, :vote, null: false, foreign_key: true + end +end diff --git a/db/migrate/20250328010547_create_organizers.rb b/db/migrate/20250328010547_create_organizers.rb new file mode 100644 index 0000000..74516fa --- /dev/null +++ b/db/migrate/20250328010547_create_organizers.rb @@ -0,0 +1,8 @@ +class CreateOrganizers < ActiveRecord::Migration[7.2] + def change + create_table :organizers do |t| + t.belongs_to :vote + t.belongs_to :user + end + end +end diff --git a/db/migrate/20250328014902_add_state_to_votes.rb b/db/migrate/20250328014902_add_state_to_votes.rb new file mode 100644 index 0000000..af69818 --- /dev/null +++ b/db/migrate/20250328014902_add_state_to_votes.rb @@ -0,0 +1,5 @@ +class AddStateToVotes < ActiveRecord::Migration[7.2] + def change + add_column :votes, :state, :string + end +end