rails_db_convert_using_adapters icon indicating copy to clipboard operation
rails_db_convert_using_adapters copied to clipboard

PAGE_SIZE must be higher than max row count in SQL Server

Open unixmonkey opened this issue 15 years ago • 0 comments

Thanks, this is just what I needed, but one note; on SQL Server as the production DB (at least in version 2005), if there are more records in a single table than the PAGE_SIZE is set to, The next loop will try to start over, and the primary_key constraint will cause it to choke by trying to re-insert the record with an ID of 1. This has to do with the limited support for LIMIT and OFFSET in SQL server. Raising the LIMIT to over the limit of the highest row count works fine. Just thought you should know, maybe put it in the readme, or check if ProductionModelClass.connection.adapter_name == 'SQLServer'.

unixmonkey avatar May 21 '10 21:05 unixmonkey