diff --git a/config/database.yml b/config/database.yml index 28a1dd5ec120c436f9feb8ead10f1b666d7088c0..efe8ff8bba66a0ddb4282beca6915ad9b7294a48 100644 --- a/config/database.yml +++ b/config/database.yml @@ -6,15 +6,15 @@ development: adapter: postgresql encoding: unicode database: portalmec_dev - username: luan - password: luanmatheus + username: arthur + password: senhadopostgres test: adapter: postgresql encoding: unicode database: portalmec_test - username: luan - password: luanmatheus + username: arthur + password: senhadopostgres # host: postgres production: diff --git a/db/migrate/20220808130940_add_priority_to_complaint_reasons.rb b/db/migrate/20220808130940_add_priority_to_complaint_reasons.rb new file mode 100644 index 0000000000000000000000000000000000000000..0a5fb05c08c3c1f2f54c98649a482b49f07c3a32 --- /dev/null +++ b/db/migrate/20220808130940_add_priority_to_complaint_reasons.rb @@ -0,0 +1,5 @@ +class AddPriorityToComplaintReasons < ActiveRecord::Migration[7.0] + def change + add_column :complaint_reasons, :priority, :integer + end +end diff --git a/db/migrate/20220815142111_create_complaint_votes.rb b/db/migrate/20220815142111_create_complaint_votes.rb new file mode 100644 index 0000000000000000000000000000000000000000..f3a069b7c3d093c001a2dc931e42e3c06c13223e --- /dev/null +++ b/db/migrate/20220815142111_create_complaint_votes.rb @@ -0,0 +1,13 @@ +class CreateComplaintVotes < ActiveRecord::Migration[7.0] + def change + create_table :complaint_votes do |t| + t.references :complainable, polymorphic: true, index: true + t.integer :pros + t.integer :cons + + t.timestamps + end + + add_index :complaint_votes, [:complainable_id], name: 'complainable' + end +end