rails_db_convert_using_adapters icon indicating copy to clipboard operation
rails_db_convert_using_adapters copied to clipboard

For single-table-inheritance tables, the 'type' column doesn't get copied.

Open unixmonkey opened this issue 15 years ago • 2 comments

Type is a reserved word, so setting it in model.attributes doesn't work. Adding the following line just above new_model.id = model.id should do the trick: new_model[:type] = model[:type] if model[:type].present?

unixmonkey avatar May 21 '10 23:05 unixmonkey

My fork at http://github.com/mlc/rails_db_convert_using_adapters should solve this issue as well, albeit in a different manner.

mlc avatar May 26 '10 18:05 mlc

@mlc: it does not, as sqlite doesn't support the syntax of INSERT INTO with multiple values, it would have to be a new insert for each row.

unixmonkey avatar Sep 22 '10 14:09 unixmonkey