activerecord-sqlserver-adapter icon indicating copy to clipboard operation
activerecord-sqlserver-adapter copied to clipboard

Rails 6

Open m-andreas opened this issue 7 years ago • 17 comments

As rails 6 Beta is out, are there any plans for rails 6 already?

m-andreas avatar Mar 07 '19 11:03 m-andreas

Not yet. PRs are welcome now that 5.2.0 was released.

wpolicarpo avatar Mar 19 '19 22:03 wpolicarpo

For those willing to help, #690 is waiting for some contributors.

wpolicarpo avatar May 19 '19 20:05 wpolicarpo

Rails 6.0 is released.

juice avatar Aug 20 '19 10:08 juice

I'm trying to update to rails 6 and hit this problem.

Seems to turn around @columns_hash. Some code did change in AR. I tried the 6.0 dev branch and get ArgumentError (wrong number of arguments (given 7, expected 2..5)): error

Have you an idea on the time frame needed to modify this great code ?

Can I help on some aspects ? Regards

net1957 avatar Sep 11 '19 20:09 net1957

Is a rails 6.0 release being worked on still?

spacerobotTR avatar Jan 17 '20 20:01 spacerobotTR

@wpolicarpo You have a branch linked above that was a draft for Rails 6 wip, so you seem to have some experience working on the adapter. Can you provide some public insight about what kind of changes happened to AR that make SQL Server hard to support? I'm not trying to pin you down specifically, it's just that there's been a lot of stalled progress on both TinyTDS and AR Adapter. It has me wondering what challenges have been presented (and ultimately, whether it's anything I can help make progress against). Thanks!

ttilberg avatar Jan 17 '20 21:01 ttilberg

@ttilberg The "Rails 6 wip" branch has not merged any pull requests. I believe my pull request ( #714 ) is the latest. This PR includes:

  • #710 - changed the parameters for sql_for_insert method to match changes to active-record
  • I changed the rails version to 6.0.0 from 6.0.0.beta3

These small changes cleared up a lot of the failing tests and errors. Unfortunately, there are still failing tests due to one of two issues:

  1. ActiveRecord::StatementInvalid: TinyTds::Error: Cannot insert explicit value for identity column in table 'posts' when IDENTITY_INSERT is set to OFF.
  2. ActiveRecord::ConnectionNotEstablished: No connection pool with 'primary' found.

dglaser avatar Feb 04 '20 06:02 dglaser

@dglaser I've found something relevant to the 1st note -- I added a pr to yours.

ttilberg avatar Feb 18 '20 18:02 ttilberg

Meanwhile this support is in progress are there alternatives?

johan-smits avatar Mar 31 '20 12:03 johan-smits

Hey guys, unfortunately there are no alternatives, except to help with the migration :(

I released v5.2.1 yesterday and master is green-ish again (thanks to @aidanharan) so we can focus on Rails 6 in #690 as I already mentioned.

wpolicarpo avatar Mar 31 '20 14:03 wpolicarpo

@wpolicarpo I ended up downgrading my rails setup because the app was simple.

I don't have enough experience to help with the migration but will track the status of this issue when there are test users needed.

johan-smits avatar Mar 31 '20 14:03 johan-smits

@johan-smits and @mentions If you guys don't mind JRuby there is already an alternative SQL Server adapter with Rails 6.0 support since last year.

I already have some huge apps in production. Bear in mind it only works in JRuby.

JesseChavez avatar Apr 03 '20 12:04 JesseChavez

Thanks for all the work you all have done upgrading to Rails 6. I upgraded using the 6-0-dev branch about a week ago and haven't run into any kind of significant issues.

matthewdunbar avatar May 15 '20 16:05 matthewdunbar

It's been awesome to follow the progress made over the past months. Great to see 6.0.0rc1 out there now! Nice work!

tbonz avatar May 15 '20 18:05 tbonz

Hi guys, version 6.0.0.rc1 is out.

Please test and report any issues you may find.

Closing this.

wpolicarpo avatar May 15 '20 18:05 wpolicarpo

@JesseChavez to me it is looking good! Thanks for the effort of all the contributors!

johan-smits avatar May 26 '20 14:05 johan-smits

rc2 is working for me on Rails 6.0.3.1 Thanks for this!

net1957 avatar May 26 '20 18:05 net1957