-
-
Notifications
You must be signed in to change notification settings - Fork 161
6.0 Upgrade Guide
Peter Solnica edited this page Apr 15, 2022
·
2 revisions
We've dropped support for MRI < 2.7, so please upgrade your Ruby first if needed.
- ❗
⚠️ REMOVErom-core
,rom-changeset
androm-repository
from your Gemfile - Add
rom, "6.0.0.alpha1
to your Gemfile
In this mode, old setup API should still work, to enable this mode:
- Add
require "rom/compat"
to the place where rom is being configured
When enabled, you won't have to update your rom setup code.
rom/compat
until 6.0.0 beta.
If you decide to use the new setup API, there's no need to require rom/compat
, but you will have to follow the following upgrade steps:
- Update usage of
ROM::Configuration
# Before
setup = ROM::Configuration.new(:sql, "postgres://localhost/rom")
# After
setup = ROM::Setup.new(:sql, "postgres://localhost/rom")
- Update usage of
auto_registration
# Before
setup.auto_registration(...)
# After
setup.auto_register(...)
- Update usage of
ROM.container
# Before
rom = ROM.container(setup)
# After
rom = setup.finalize
- In
rom/compat
mode,indexes
schema DSL is not yet working - In
rom/compat
mode, aliased associations may not set correct dataset name
In order to upgrade:
- Add
gem "rom-sql", "6.0.0.alpha1"
to you Gemfile