Merge branch 'master' into 1856-legislation_processes_proposals_phase

This commit is contained in:
María Checa
2017-09-21 21:24:56 +02:00
142 changed files with 890 additions and 2049 deletions

View File

@@ -0,0 +1,18 @@
class CreatePollTotalResults < ActiveRecord::Migration
def change
create_table :poll_total_results do |t|
t.integer :author_id
t.integer :amount
t.string :origin
t.date :date
t.integer :booth_assignment_id
t.integer :officer_assignment_id
t.text :amount_log, default: ""
t.text :officer_assignment_id_log, default: ""
t.text :author_id_log, default: ""
end
add_index :poll_total_results, :officer_assignment_id
add_index :poll_total_results, :booth_assignment_id
end
end

View File

@@ -0,0 +1,10 @@
class FixPasswordChangedAtDefault < ActiveRecord::Migration
def up
change_column_default :users, :password_changed_at, Time.new(2015, 1, 1, 1, 1, 1)
end
def down
change_column_default :users, :password_changed_at, Time.now
end
end

View File

@@ -0,0 +1,11 @@
class RemovePollFinalRecounts < ActiveRecord::Migration
def change
remove_index :poll_final_recounts, column: :booth_assignment_id
remove_index :poll_final_recounts, column: :officer_assignment_id
remove_foreign_key :poll_final_recounts, column: "booth_assignment_id"
remove_foreign_key :poll_final_recounts, column: "officer_assignment_id"
drop_table :poll_final_recounts
end
end