Use Rails 5 conventions in ballot migrations
These migrations and models were added after the Rails 5 branch was created but before it was merged.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
class Poll::Ballot < ActiveRecord::Base
|
||||
class Poll::Ballot < ApplicationRecord
|
||||
belongs_to :ballot_sheet, class_name: Poll::BallotSheet
|
||||
|
||||
validates :ballot_sheet_id, presence: true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Poll::BallotSheet < ActiveRecord::Base
|
||||
class Poll::BallotSheet < ApplicationRecord
|
||||
belongs_to :poll
|
||||
belongs_to :officer_assignment
|
||||
has_many :ballots, class_name: Poll::Ballot
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddBallotedHeadingIdToUsers < ActiveRecord::Migration
|
||||
class AddBallotedHeadingIdToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :balloted_heading_id, :integer, default: nil
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddBudgetToPolls < ActiveRecord::Migration
|
||||
class AddBudgetToPolls < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_reference :polls, :budget, index: { unique: true }, foreign_key: true
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreatePollBallotSheets < ActiveRecord::Migration
|
||||
class CreatePollBallotSheets < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :poll_ballot_sheets do |t|
|
||||
t.text :data
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreatePollBallot < ActiveRecord::Migration
|
||||
class CreatePollBallot < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :poll_ballots do |t|
|
||||
t.integer :ballot_sheet_id
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddPhysicalToBudgetBallot < ActiveRecord::Migration
|
||||
class AddPhysicalToBudgetBallot < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :budget_ballots, :physical, :boolean, default: false
|
||||
add_column :budget_ballots, :poll_ballot_id, :integer
|
||||
|
||||
Reference in New Issue
Block a user