Skip to content

Switch development from SQLite, or patch as no-op? #138

@mrj

Description

@mrj

Now that SQLite support has been removed, what is the best way to develop an app that needs advisory locks: Change development to another database, or patch with_advisory_lock to do nothing on SQLite rather than give the error

NoMethodError: undefined method 'with_advisory_lock_if_needed' for an instance of ActiveRecord::ConnectionAdapters::SQLite3Adapter (NoMethodError)

?

The former has the burden of having a database server set up and running, but the latter doesn't exercise the locking code in development, even though a lock will never wait with single-threaded access.

I'd like the option of a no-op to simplify initial development, changing the dev database closer to first deployment.

Is it easy to make everything a no-op on SQLite?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions