Add the datalayer and migrations for Authors and DBIServers.

This commit is contained in:
2025-03-05 22:10:07 +02:00
parent 371546064c
commit f2b8e49a2f
6 changed files with 210 additions and 2 deletions
@@ -1,7 +1,13 @@
defmodule DecentralisedBookIndex.Metadata.Author do
use Ash.Resource,
otp_app: :decentralised_book_index,
domain: DecentralisedBookIndex.Metadata
domain: DecentralisedBookIndex.Metadata,
data_layer: AshPostgres.DataLayer
postgres do
table "authors"
repo DecentralisedBookIndex.Repo
end
actions do
defaults [:read]
@@ -1,7 +1,13 @@
defmodule DecentralisedBookIndex.Metadata.DBIServer do
use Ash.Resource,
otp_app: :decentralised_book_index,
domain: DecentralisedBookIndex.Metadata
domain: DecentralisedBookIndex.Metadata,
data_layer: AshPostgres.DataLayer
postgres do
table "dbi_servers"
repo DecentralisedBookIndex.Repo
end
actions do
defaults [:read]