lib/generators/statesman/templates/update_migration.rb.erb in statesman-2.0.1 vs lib/generators/statesman/templates/update_migration.rb.erb in statesman-3.0.0

- old
+ new

@@ -7,8 +7,8 @@ add_column :<%= table_name %>, :most_recent, null: false add_column :<%= table_name %>, :created_at, :datetime, null: false add_column :<%= table_name %>, :updated_at, :datetime, null: false add_index :<%= table_name %>, [:<%= parent_id %>, :sort_key], unique: true, name: "<%= index_name :parent_sort %>" - add_index :<%= table_name %>, [:<%= parent_id %>, :most_recent], unique: true, where: "most_recent", name: "<%= index_name :parent_most_recent %>" + add_index :<%= table_name %>, [:<%= parent_id %>, :most_recent], unique: true, <%= "where: 'most_recent', " if database_supports_partial_indexes? %>name: "<%= index_name :parent_most_recent %>" end end