Skip to content

jakeprem/ecto_storage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EctoStorage

What is it?

EctoStorage is meant to provide robust object storage capabilities for Ecto schemas. It's heavily inspired by Rails's ActiveStorage while still trying to follow Ecto patterns like avoiding the record_id, record_type polymorphism pattern.

To that end it (currently) uses a Ledger approach, where polymorphism is achieved by adding a foreign key from the main table (e.g. Post) to the attachments ledger table. Then all attachment records point to the ledger table, using it as a sort of constrained join table.

See /examples

Installation

If available in Hex, the package can be installed by adding ecto_storage to your list of dependencies in mix.exs:

def deps do
  [
    {:ecto_storage, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/ecto_storage.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages