db_leftovers 1.4.1 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
data/Changelog CHANGED
@@ -1,7 +1,12 @@
1
+ 1.4.2
2
+ -----
3
+
4
+ - Fixed problem with dropping and re-creating indexes every time.
5
+
1
6
  1.4.1
2
7
  -----
3
8
 
4
- - Improved feedback so we print the expression on functional indexes
9
+ - Improved feedback so we print the expression on functional indexes.
5
10
 
6
11
 
7
12
  1.4.0
@@ -41,8 +41,6 @@ module DBLeftovers
41
41
  end
42
42
 
43
43
  def index(table_name, column_names, opts={})
44
- column_names = [column_names].flatten
45
- # puts "#{table_name}.[#{column_names.join(',')}]"
46
44
  add_index(Index.new(table_name, column_names, opts))
47
45
  end
48
46
 
@@ -15,8 +15,8 @@ module DBLeftovers
15
15
  opts.keys.each do |k|
16
16
  raise "Unknown option: #{k}" unless [:where, :function, :unique, :using, :name].include?(k)
17
17
  end
18
- if column_names.is_a?(Array) and column_names[0].is_a?(String) and opts[:function].nil?
19
- opts[:function] = column_names[0]
18
+ if column_names.is_a?(String) and opts[:function].nil?
19
+ opts[:function] = column_names
20
20
  column_names = []
21
21
  end
22
22
  @table_name = table_name.to_s
@@ -1,3 +1,3 @@
1
1
  module DbLeftovers
2
- VERSION = '1.4.1'
2
+ VERSION = '1.4.2'
3
3
  end
@@ -110,7 +110,7 @@ describe DBLeftovers::PostgresDatabaseInterface do
110
110
  @db.lookup_all_indexes.keys.sort.should == ['index_authors_on_lower_name']
111
111
  end
112
112
 
113
- it "should allow functional indexes specified with an option" do
113
+ it "should allow functional indexes specified with an option", focus: true do
114
114
  DBLeftovers::Definition.define :db_interface => @db do
115
115
  index :authors, [], function: 'lower(name)'
116
116
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: db_leftovers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.4.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -112,7 +112,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
112
112
  version: '0'
113
113
  segments:
114
114
  - 0
115
- hash: -1384874147210537505
115
+ hash: 1388756177048259966
116
116
  required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  none: false
118
118
  requirements: