Changeset 5459
- Timestamp:
- 11/07/06 19:56:01 (3 years ago)
- Files:
-
- trunk/activerecord/CHANGELOG (modified) (1 diff)
- trunk/activerecord/lib/active_record/connection_adapters/firebird_adapter.rb (modified) (4 diffs)
- trunk/activerecord/test/migration_test_firebird.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activerecord/CHANGELOG
r5452 r5459 1 1 *SVN* 2 3 * Firebird: decimal/numeric support. #6408 [macrnic] 2 4 3 5 * make add_order a tad faster. #6567 [Stefan Kaes] trunk/activerecord/lib/active_record/connection_adapters/firebird_adapter.rb
r4594 r5459 51 51 @default = parse_default(default_source) if default_source 52 52 @limit = decide_limit(length) 53 @domain, @sub_type, @precision, @scale = domain, sub_type, precision, scale 53 @domain, @sub_type, @precision, @scale = domain, sub_type, precision, scale.abs 54 54 end 55 55 … … 294 294 :text => { :name => "blob sub_type text" }, 295 295 :integer => { :name => "bigint" }, 296 :decimal => { :name => "decimal" }, 297 :numeric => { :name => "numeric" }, 296 298 :float => { :name => "float" }, 297 299 :datetime => { :name => "timestamp" }, … … 535 537 536 538 def remove_index(table_name, options) #:nodoc: 537 if Hash === options 538 index_name = options[:name] 539 else 540 index_name = "#{table_name}_#{options}_index" 541 end 542 execute "DROP INDEX #{index_name}" 539 execute "DROP INDEX #{quote_column_name(index_name(table_name, options))}" 543 540 end 544 541 … … 569 566 end 570 567 571 def type_to_sql(type, limit = nil ) # :nodoc:568 def type_to_sql(type, limit = nil, precision = nil, scale = nil) # :nodoc: 572 569 case type 573 570 when :integer then integer_sql_type(limit) 574 571 when :float then float_sql_type(limit) 575 when :string then super 576 else super(type )572 when :string then super(type, limit, precision, scale) 573 else super(type, limit, precision, scale) 577 574 end 578 575 end trunk/activerecord/test/migration_test_firebird.rb
r4594 r5459 92 92 assert !@connection.tables.include?("foo") 93 93 assert @connection.tables.include?("bar") 94 assert_equal " bar_baz_index", @connection.indexes("bar").first.name94 assert_equal "index_bar_on_baz", @connection.indexes("bar").first.name 95 95 assert_equal 100, FireRuby::Generator.new("bar_seq", @fireruby_connection).last 96 96 assert_equal 100, @connection.select_one("SELECT COUNT(*) FROM bar")["count"]