sequel 3.24.0 → 3.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ === 3.24.1 (2011-06-03)
2
+
3
+ * Ignore index creation errors if using create_table? with the IF NOT EXISTS syntax (jeremyevans) (#362)
4
+
1
5
  === 3.24.0 (2011-06-01)
2
6
 
3
7
  * Add prepared_statements_association plugin, for using prepared statements by default for regular association loading (jeremyevans)
@@ -1166,7 +1166,7 @@ when eager loading via eager_graph, but called when eager loading via eager.
1166
1166
  class Artist
1167
1167
  # Cache all album names to a single string when retrieving the
1168
1168
  # albums.
1169
- one_to_many :albums, :after_add=>:cache_album_names
1169
+ one_to_many :albums, :after_load=>:cache_album_names
1170
1170
 
1171
1171
  attr_reader :album_names
1172
1172
 
@@ -363,7 +363,7 @@ module Sequel
363
363
 
364
364
  # Execute the create index statements using the generator.
365
365
  def create_table_indexes_from_generator(name, generator, options)
366
- e = options[:ignore_index_errors]
366
+ e = options[:ignore_index_errors] || options[:if_not_exists]
367
367
  generator.indexes.each do |index|
368
368
  begin
369
369
  index_sql_list(name, [index]).each{|sql| execute_ddl(sql)}
@@ -6,7 +6,7 @@ module Sequel
6
6
  MINOR = 24
7
7
  # The tiny version of Sequel. Usually 0, only bumped for bugfix
8
8
  # releases that fix regressions from previous versions.
9
- TINY = 0
9
+ TINY = 1
10
10
 
11
11
  # The version of Sequel you are using, as a string (e.g. "2.11.0")
12
12
  VERSION = [MAJOR, MINOR, TINY].join('.')
@@ -183,6 +183,15 @@ describe "Database schema modifiers" do
183
183
  @db[:items].columns.should == [:b]
184
184
  end
185
185
 
186
+ specify "should have create_table? work correctly with indexes" do
187
+ @db.create_table!(:items){String :a, :index=>true}
188
+ @db.create_table?(:items){String :b, :index=>true}
189
+ @db[:items].columns.should == [:a]
190
+ @db.drop_table(:items) rescue nil
191
+ @db.create_table?(:items){String :b, :index=>true}
192
+ @db[:items].columns.should == [:b]
193
+ end
194
+
186
195
  specify "should rename tables correctly" do
187
196
  @db.drop_table(:items) rescue nil
188
197
  @db.create_table!(:items2){Integer :number}
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel
3
3
  version: !ruby/object:Gem::Version
4
- hash: 103
4
+ hash: 101
5
5
  prerelease: false
6
6
  segments:
7
7
  - 3
8
8
  - 24
9
- - 0
10
- version: 3.24.0
9
+ - 1
10
+ version: 3.24.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jeremy Evans
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-01 00:00:00 -07:00
18
+ date: 2011-06-03 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies: []
21
21