Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #2531 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

[PATCH] Renaming existing column during migrations in SQLite fails with symbol arguments - 0.14.1

Reported by: kevinclark Assigned to: David
Priority: high Milestone: 1.0
Component: ActiveRecord Version:
Severity: blocker Keywords: migration sqlite fd
Cc:

Description

Here's the testcase that fails in MigrationTest

def test_rename_column_using_symbol_arguments

Person.connection.rename_column :people, :first_name, :nick_name Person.reset_column_information assert Person.column_names.include?("nick_name")

end

My patch forces the sqlight adapter's copy_table method to check for symbolic hash keys so as to get the correct new column name.

Attachments

sqlight_rename_column.diff (2.1 kB) - added by kevinclark on 10/20/05 08:56:04.
patch to fix copy_table in sqlite adapter

Change History

10/20/05 08:56:04 changed by kevinclark

  • attachment sqlight_rename_column.diff added.

patch to fix copy_table in sqlite adapter

10/20/05 12:35:28 changed by anonymous

  • summary changed from [PATCH] Renaming existing tables during migrations in SQLight fails with symbol arguments - 0.14.1 to [PATCH] Renaming existing tables during migrations in SQLite fails with symbol arguments - 0.14.1.

10/20/05 14:06:21 changed by kevinclark

  • summary changed from [PATCH] Renaming existing tables during migrations in SQLite fails with symbol arguments - 0.14.1 to [PATCH] Renaming existing column during migrations in SQLite fails with symbol arguments - 0.14.1.

Renaming existing columns works fine. This if for columns.

10/21/05 14:31:52 changed by anonymous

  • priority changed from high to highest.
  • severity changed from major to blocker.

10/21/05 19:52:48 changed by anonymous

  • version deleted.

10/22/05 20:13:09 changed by anonymous

  • keywords changed from migration sqlite to migration sqlite fd.

10/25/05 19:29:53 changed by minam

  • status changed from new to closed.
  • resolution set to fixed.

Fixed by [2731]. Thank-you for the patch!