orma
Version, currently 0.2.128 versions
- 0.13.0latestJun 27, 2026
- 0.12.1not indexedJul 7, 2026
- 0.12.0not indexedJul 7, 2026
- 0.11.0not indexedJul 7, 2026
- 0.10.2not indexedJul 7, 2026
- 0.10.1not indexedJul 7, 2026
- 0.10.0not indexedJul 7, 2026
- 0.9.0not indexedJul 7, 2026
- 0.8.0not indexedJul 7, 2026
- 0.7.1not indexedJul 7, 2026
- 0.7.0not indexedJul 7, 2026
- 0.6.2not indexedJul 7, 2026
- 0.6.1not indexedJul 7, 2026
- 0.6.0not indexedJul 7, 2026
- 0.5.2not indexedJul 7, 2026
- 0.5.1not indexedJul 7, 2026
- 0.5.0not indexedJul 7, 2026
- 0.4.2not indexedJul 7, 2026
- 0.4.1not indexedJul 7, 2026
- 0.4.0not indexedJul 7, 2026
- 0.3.4not indexedJul 7, 2026
- 0.3.3not indexedJul 7, 2026
- 0.3.2not indexedJul 7, 2026
- 0.3.1not indexedJul 7, 2026
- 0.3.0not indexedJul 7, 2026
- 0.2.1not indexedJul 7, 2026
- 0.2.0not indexedJul 7, 2026
- 0.1.0not indexedJul 7, 2026
github.com/sbsoftware/orma
No description declared in shard.yml.
Nothing has been indexed for 0.2.1 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
orma:
github: sbsoftware/orma
version: ~> 0.2.1Then run:
shards installshard.yml
No shard.yml has been indexed for 0.2.1. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
Orma
Orma is an ActiveRecord-style persistence layer for Crystal with built-in continuous migration. It aims to keep record definitions, querying, associations, and schema evolution close together so you can move quickly without maintaining a separate migration workflow for every change.
Installation
-
Add the dependency to your
shard.yml:dependencies: orma: github: sbsoftware/orma -
Run
shards install
Usage
require "orma"
# ENV["DATABASE_URL"] must be set
class Post < Orma::Record
column title : String
has_many_of Comment
end
class Comment < Orma::Record
column body : String
belongs_to Post
end
post = Post.create(title: "Hello")
Comment.create(body: "Nice post", post_id: post.id)
comments = Comment.where(post_id: post.id)
comment = comments.first
comment.post.title # => "Hello"
Why Orma
- Define records with columns directly in Crystal
- Query records with a compact, chainable API
- Model relationships with
belongs_toandhas_many - Keep schema changes in sync through continuous migration
- Work against supported database backends without centering the API around one specific adapter
Core Concepts
Records and columns
Define your model as a Crystal class inheriting from Orma::Record. Columns are declared in the class body, and Orma uses those declarations as the source of truth for persistence and schema management.
Query chaining
Records can be queried through a chainable API for filtering, ordering, and limiting result sets, giving you an ActiveRecord-like workflow while staying close to Crystal types.
Associations
Orma supports common record relationships such as belongs_to and has_many, so related records can be modeled directly in your domain classes.
Continuous migration
Continuous migration is an experimental, yet central feature of Orma.
Instead of maintaining a separate migration file for each schema change, Orma can derive and apply structural changes from your record definitions.
Column removal is designed as a staged process. If you want to retire a column, change it from column to deprecated_column. Continuous migration will rename the backing column to _<name>_deprecated while keeping the value readable through the model.
After the deprecated column is no longer needed, remove the deprecated_column declaration from the model. On the next migration run, Orma will delete the matching _<name>_deprecated column. Note that simply removing non-deprecated column definitions will leave them in the database as-is.
This is currently the built-in path for schema evolution and should be treated with appropriate care, especially in production environments.
To enable it, set ENV["ORMA_CONTINUOUS_MIGRATION"]=1. Opting out of it means you'll have to take care of migrations yourself.
Supported Databases
Orma currently supports:
- SQLite3
- PostgreSQL
Development
Run the test suite:
crystal spec
Contributing
- Fork it (https://github.com/sbsoftware/orma/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Stefan Bilharz - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.2.1- Tagged
- Jul 7, 2026
- Commit
5b7481d5ed86- Indexed
- not yet
Dependents
Repository
github.com/sbsoftware/orma
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 18, 2026
- Synced
- Aug 18, 2026
- Versions
- 28