Skip to content

Conversation

@michaelglass
Copy link
Contributor

@michaelglass michaelglass commented Apr 1, 2025

@derek-noredink upgraded this to support active record 7 as far as I can tell

can you test this against the monolith (using AR 7) and see if it still works?

the commands in the monolith are ...

  • ./script/export_live_fixtures.sh to test building the fixtures and
  • rake db:reset to test importing the fixtures

contributes to https://linear.app/noredink/issue/FXN-3849/upgrade-rails-to-72

@michaelglass michaelglass marked this pull request as ready for review April 1, 2025 12:40
iterator.new(ff).each do |tname, label, row|
conn.insert_fixture(row, tname)
@label_to_id[label] = conn.send(:last_inserted_id, tname) unless label == NO_LABEL
last_inserted_id = conn.insert(conn.send(:build_fixture_sql, Array.wrap(row), tname))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rails 7 drops sqlite-specific last_inserted_id and the old API was invalid

@michaelglass michaelglass merged commit ce38d54 into master Apr 1, 2025
1 check passed
@michaelglass michaelglass deleted the active_record-7 branch April 1, 2025 13:40
@linear
Copy link

linear bot commented Apr 1, 2025

@derek-noredink
Copy link

I had trouble figuring out how the authentication works for that script. That said, maybe it would be quicker for you to give it a go. Here's the branch with rails 7.0 already setup: https://github.com/NoRedInk/NoRedInk/pull/51365

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants