Skip to content

Add Amazon DynamoDB ORM adapter (Dynamoid and aws-record) - #5887

Closed
sahild wants to merge 1 commit into
heartcombo:mainfrom
sahild:dynamodb-orm-adapter-2
Closed

sahild wants to merge 1 commit into
heartcombo:mainfrom
sahild:dynamodb-orm-adapter-2

Conversation

@sahild

@sahild sahild commented Nov 22, 2026

Copy link
Copy Markdown

Adds require 'devise/orm/dynamodb', backed by Dynamoid (default) or aws-record, chosen with config.dynamodb_library. Supports database_authenticatable, rememberable, validatable, confirmable, trackable, recoverable and lockable.

  • OrmAdapter for DynamoDB: key reads by id, GSI queries for indexed attributes, scan fallback otherwise.
  • ActiveRecord-compatible validates_uniqueness_of (case_sensitive, scope, allow_nil/allow_blank, if/unless/on, message; :taken error) with a fallback English message.
  • Dirty tracking matching ActiveRecord semantics inside after_update.
  • Atomic increment_counter for lockable.
  • aws-record: ActiveModel validations, callbacks, serialization and AR-style persistence methods, plus a precise time formatter.
  • dynamodb:devise generator, devise:install --orm=dynamodb, and devise:dynamodb:create_tables / drop_tables / ping rake tasks.
  • Test suite runs with DEVISE_ORM=dynamodb for both libraries; new unit tests in test/orm_dynamodb; CI jobs using DynamoDB Local.
  • guides/dynamodb.md documents setup and the behaviours that differ from ActiveRecord; examples/dynamodb_app is a working sample app.

Adds `require 'devise/orm/dynamodb'`, backed by Dynamoid (default) or
aws-record, chosen with `config.dynamodb_library`. Supports
database_authenticatable, rememberable, validatable, confirmable,
trackable, recoverable and lockable.

- OrmAdapter for DynamoDB: key reads by id, GSI queries for indexed
  attributes, scan fallback otherwise.
- ActiveRecord-compatible validates_uniqueness_of (case_sensitive, scope,
  allow_nil/allow_blank, if/unless/on, message; :taken error) with a
  fallback English message.
- Dirty tracking matching ActiveRecord semantics inside after_update.
- Atomic increment_counter for lockable.
- aws-record: ActiveModel validations, callbacks, serialization and
  AR-style persistence methods, plus a precise time formatter.
- dynamodb:devise generator, `devise:install --orm=dynamodb`, and
  devise:dynamodb:create_tables / drop_tables / ping rake tasks.
- Test suite runs with DEVISE_ORM=dynamodb for both libraries; new unit
  tests in test/orm_dynamodb; CI jobs using DynamoDB Local.
- guides/dynamodb.md documents setup and the behaviours that differ from
  ActiveRecord; examples/dynamodb_app is a working sample app.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@sahild sahild closed this Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant