Add relationships to server for all resources.

dev
KKlochko 3 months ago
parent b49b7c954c
commit 97758de39c

@ -157,6 +157,8 @@ defmodule DecentralisedBookIndex.Metadata.Author do
end end
relationships do relationships do
belongs_to :dbi_server, Metadata.DBIServer
belongs_to :author_alias_registry, Metadata.AuthorAliasRegistry do belongs_to :author_alias_registry, Metadata.AuthorAliasRegistry do
attribute_writable? true attribute_writable? true
end end

@ -4,6 +4,8 @@ defmodule DecentralisedBookIndex.Metadata.AuthorAliasRegistry do
domain: DecentralisedBookIndex.Metadata, domain: DecentralisedBookIndex.Metadata,
data_layer: AshPostgres.DataLayer data_layer: AshPostgres.DataLayer
alias DecentralisedBookIndex.Metadata
postgres do postgres do
table "author_alias_registries" table "author_alias_registries"
repo DecentralisedBookIndex.Repo repo DecentralisedBookIndex.Repo
@ -26,6 +28,8 @@ defmodule DecentralisedBookIndex.Metadata.AuthorAliasRegistry do
end end
relationships do relationships do
belongs_to :dbi_server, Metadata.DBIServer
has_many :authors, DecentralisedBookIndex.Metadata.Author has_many :authors, DecentralisedBookIndex.Metadata.Author
end end
end end

@ -44,6 +44,8 @@ defmodule DecentralisedBookIndex.Metadata.AuthorRole do
accept [:order, :role] accept [:order, :role]
argument :author_id, :uuid argument :author_id, :uuid
require_atomic? false
change fn changeset, _ -> change fn changeset, _ ->
author_id = changeset.arguments.author_id author_id = changeset.arguments.author_id
@ -75,6 +77,8 @@ defmodule DecentralisedBookIndex.Metadata.AuthorRole do
end end
relationships do relationships do
belongs_to :dbi_server, Metadata.DBIServer
belongs_to :book, Metadata.Book do belongs_to :book, Metadata.Book do
allow_nil? true allow_nil? true
end end

@ -148,6 +148,8 @@ defmodule DecentralisedBookIndex.Metadata.Book do
end end
relationships do relationships do
belongs_to :dbi_server, Metadata.DBIServer
belongs_to :book_editions_registry, Metadata.BookEditionsRegistry belongs_to :book_editions_registry, Metadata.BookEditionsRegistry
belongs_to :publisher, Metadata.Publisher belongs_to :publisher, Metadata.Publisher

@ -4,6 +4,8 @@ defmodule DecentralisedBookIndex.Metadata.BookEditionsRegistry do
domain: DecentralisedBookIndex.Metadata, domain: DecentralisedBookIndex.Metadata,
data_layer: AshPostgres.DataLayer data_layer: AshPostgres.DataLayer
alias DecentralisedBookIndex.Metadata
postgres do postgres do
table "book_editions_registries" table "book_editions_registries"
repo DecentralisedBookIndex.Repo repo DecentralisedBookIndex.Repo
@ -26,6 +28,8 @@ defmodule DecentralisedBookIndex.Metadata.BookEditionsRegistry do
end end
relationships do relationships do
belongs_to :dbi_server, Metadata.DBIServer
has_many :authors, DecentralisedBookIndex.Metadata.Book has_many :authors, DecentralisedBookIndex.Metadata.Book
end end
end end

@ -57,6 +57,8 @@ defmodule DecentralisedBookIndex.Metadata.BookId do
end end
relationships do relationships do
belongs_to :dbi_server, Metadata.DBIServer
belongs_to :book, Metadata.Book do belongs_to :book, Metadata.Book do
allow_nil? true allow_nil? true
end end

@ -4,6 +4,8 @@ defmodule DecentralisedBookIndex.Metadata.DBIServer do
domain: DecentralisedBookIndex.Metadata, domain: DecentralisedBookIndex.Metadata,
data_layer: AshPostgres.DataLayer data_layer: AshPostgres.DataLayer
alias DecentralisedBookIndex.Metadata
postgres do postgres do
table "dbi_servers" table "dbi_servers"
repo DecentralisedBookIndex.Repo repo DecentralisedBookIndex.Repo
@ -38,4 +40,16 @@ defmodule DecentralisedBookIndex.Metadata.DBIServer do
timestamps() timestamps()
end end
relationships do
has_many :author, Metadata.Author
has_many :author_alias_registries, Metadata.AuthorAliasRegistry
has_many :author_roles, Metadata.AuthorRole
has_many :books, Metadata.Book
has_many :bids, Metadata.BookId
has_many :book_editions_registries, Metadata.BookEditionsRegistry
has_many :publisher, Metadata.Publisher
end
end end

@ -39,6 +39,8 @@ defmodule DecentralisedBookIndex.Metadata.Publisher do
end end
relationships do relationships do
belongs_to :dbi_server, Metadata.DBIServer
has_many :books, Metadata.Book has_many :books, Metadata.Book
end end
end end

@ -0,0 +1,125 @@
defmodule DecentralisedBookIndex.Repo.Migrations.AddRelationshipToDbiServerForAllResources do
@moduledoc """
Updates resources based on their most recent snapshots.
This file was autogenerated with `mix ash_postgres.generate_migrations`
"""
use Ecto.Migration
def up do
alter table(:publishers) do
add :dbi_server_id,
references(:dbi_servers,
column: :id,
name: "publishers_dbi_server_id_fkey",
type: :uuid,
prefix: "public"
)
end
alter table(:books) do
add :dbi_server_id,
references(:dbi_servers,
column: :id,
name: "books_dbi_server_id_fkey",
type: :uuid,
prefix: "public"
)
end
alter table(:book_ids) do
add :dbi_server_id,
references(:dbi_servers,
column: :id,
name: "book_ids_dbi_server_id_fkey",
type: :uuid,
prefix: "public"
)
end
alter table(:book_editions_registries) do
add :dbi_server_id,
references(:dbi_servers,
column: :id,
name: "book_editions_registries_dbi_server_id_fkey",
type: :uuid,
prefix: "public"
)
end
alter table(:authors) do
add :dbi_server_id,
references(:dbi_servers,
column: :id,
name: "authors_dbi_server_id_fkey",
type: :uuid,
prefix: "public"
)
end
alter table(:author_role) do
add :dbi_server_id,
references(:dbi_servers,
column: :id,
name: "author_role_dbi_server_id_fkey",
type: :uuid,
prefix: "public"
)
end
alter table(:author_alias_registries) do
add :dbi_server_id,
references(:dbi_servers,
column: :id,
name: "author_alias_registries_dbi_server_id_fkey",
type: :uuid,
prefix: "public"
)
end
end
def down do
drop constraint(:author_alias_registries, "author_alias_registries_dbi_server_id_fkey")
alter table(:author_alias_registries) do
remove :dbi_server_id
end
drop constraint(:author_role, "author_role_dbi_server_id_fkey")
alter table(:author_role) do
remove :dbi_server_id
end
drop constraint(:authors, "authors_dbi_server_id_fkey")
alter table(:authors) do
remove :dbi_server_id
end
drop constraint(:book_editions_registries, "book_editions_registries_dbi_server_id_fkey")
alter table(:book_editions_registries) do
remove :dbi_server_id
end
drop constraint(:book_ids, "book_ids_dbi_server_id_fkey")
alter table(:book_ids) do
remove :dbi_server_id
end
drop constraint(:books, "books_dbi_server_id_fkey")
alter table(:books) do
remove :dbi_server_id
end
drop constraint(:publishers, "publishers_dbi_server_id_fkey")
alter table(:publishers) do
remove :dbi_server_id
end
end
end

@ -0,0 +1,78 @@
{
"attributes": [
{
"allow_nil?": false,
"default": "fragment(\"gen_random_uuid()\")",
"generated?": false,
"primary_key?": true,
"references": null,
"size": null,
"source": "id",
"type": "uuid"
},
{
"allow_nil?": false,
"default": "fragment(\"(now() AT TIME ZONE 'utc')\")",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "inserted_at",
"type": "utc_datetime_usec"
},
{
"allow_nil?": false,
"default": "fragment(\"(now() AT TIME ZONE 'utc')\")",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "updated_at",
"type": "utc_datetime_usec"
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": {
"deferrable": false,
"destination_attribute": "id",
"destination_attribute_default": null,
"destination_attribute_generated": null,
"index?": false,
"match_type": null,
"match_with": null,
"multitenancy": {
"attribute": null,
"global": null,
"strategy": null
},
"name": "author_alias_registries_dbi_server_id_fkey",
"on_delete": null,
"on_update": null,
"primary_key?": true,
"schema": "public",
"table": "dbi_servers"
},
"size": null,
"source": "dbi_server_id",
"type": "uuid"
}
],
"base_filter": null,
"check_constraints": [],
"custom_indexes": [],
"custom_statements": [],
"has_create_action": true,
"hash": "492C5CA5764F4F67991D3D7F4C7F37FFD21A7DB5D7FDDB7FBC1E569D03646895",
"identities": [],
"multitenancy": {
"attribute": null,
"global": null,
"strategy": null
},
"repo": "Elixir.DecentralisedBookIndex.Repo",
"schema": null,
"table": "author_alias_registries"
}

@ -0,0 +1,156 @@
{
"attributes": [
{
"allow_nil?": false,
"default": "fragment(\"gen_random_uuid()\")",
"generated?": false,
"primary_key?": true,
"references": null,
"size": null,
"source": "id",
"type": "uuid"
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "role",
"type": "text"
},
{
"allow_nil?": false,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "order",
"type": "bigint"
},
{
"allow_nil?": false,
"default": "fragment(\"(now() AT TIME ZONE 'utc')\")",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "inserted_at",
"type": "utc_datetime_usec"
},
{
"allow_nil?": false,
"default": "fragment(\"(now() AT TIME ZONE 'utc')\")",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "updated_at",
"type": "utc_datetime_usec"
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": {
"deferrable": false,
"destination_attribute": "id",
"destination_attribute_default": null,
"destination_attribute_generated": null,
"index?": false,
"match_type": null,
"match_with": null,
"multitenancy": {
"attribute": null,
"global": null,
"strategy": null
},
"name": "author_role_dbi_server_id_fkey",
"on_delete": null,
"on_update": null,
"primary_key?": true,
"schema": "public",
"table": "dbi_servers"
},
"size": null,
"source": "dbi_server_id",
"type": "uuid"
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": {
"deferrable": false,
"destination_attribute": "id",
"destination_attribute_default": null,
"destination_attribute_generated": null,
"index?": false,
"match_type": null,
"match_with": null,
"multitenancy": {
"attribute": null,
"global": null,
"strategy": null
},
"name": "author_role_book_id_fkey",
"on_delete": null,
"on_update": null,
"primary_key?": true,
"schema": "public",
"table": "books"
},
"size": null,
"source": "book_id",
"type": "uuid"
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": {
"deferrable": false,
"destination_attribute": "id",
"destination_attribute_default": null,
"destination_attribute_generated": null,
"index?": false,
"match_type": null,
"match_with": null,
"multitenancy": {
"attribute": null,
"global": null,
"strategy": null
},
"name": "author_role_author_id_fkey",
"on_delete": null,
"on_update": null,
"primary_key?": true,
"schema": "public",
"table": "authors"
},
"size": null,
"source": "author_id",
"type": "uuid"
}
],
"base_filter": null,
"check_constraints": [],
"custom_indexes": [],
"custom_statements": [],
"has_create_action": true,
"hash": "C7946A25C36A8CB07E68467BFDE0C0C5369C3895C36124422CA155E4EB054C16",
"identities": [],
"multitenancy": {
"attribute": null,
"global": null,
"strategy": null
},
"repo": "Elixir.DecentralisedBookIndex.Repo",
"schema": null,
"table": "author_role"
}

@ -0,0 +1,137 @@
{
"attributes": [
{
"allow_nil?": false,
"default": "fragment(\"gen_random_uuid()\")",
"generated?": false,
"primary_key?": true,
"references": null,
"size": null,
"source": "id",
"type": "uuid"
},
{
"allow_nil?": false,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "name",
"type": "text"
},
{
"allow_nil?": false,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "description",
"type": "text"
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "avatar_url",
"type": "text"
},
{
"allow_nil?": false,
"default": "fragment(\"(now() AT TIME ZONE 'utc')\")",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "inserted_at",
"type": "utc_datetime_usec"
},
{
"allow_nil?": false,
"default": "fragment(\"(now() AT TIME ZONE 'utc')\")",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "updated_at",
"type": "utc_datetime_usec"
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": {
"deferrable": false,
"destination_attribute": "id",
"destination_attribute_default": null,
"destination_attribute_generated": null,
"index?": false,
"match_type": null,
"match_with": null,
"multitenancy": {
"attribute": null,
"global": null,
"strategy": null
},
"name": "authors_dbi_server_id_fkey",
"on_delete": null,
"on_update": null,
"primary_key?": true,
"schema": "public",
"table": "dbi_servers"
},
"size": null,
"source": "dbi_server_id",
"type": "uuid"
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": {
"deferrable": false,
"destination_attribute": "id",
"destination_attribute_default": null,
"destination_attribute_generated": null,
"index?": false,
"match_type": null,
"match_with": null,
"multitenancy": {
"attribute": null,
"global": null,
"strategy": null
},
"name": "authors_author_alias_registry_id_fkey",
"on_delete": null,
"on_update": null,
"primary_key?": true,
"schema": "public",
"table": "author_alias_registries"
},
"size": null,
"source": "author_alias_registry_id",
"type": "uuid"
}
],
"base_filter": null,
"check_constraints": [],
"custom_indexes": [],
"custom_statements": [],
"has_create_action": true,
"hash": "B16E7D36D4B6989B17D17DE8554C1B0AC13CFC31D7074163CA236F0692565C95",
"identities": [],
"multitenancy": {
"attribute": null,
"global": null,
"strategy": null
},
"repo": "Elixir.DecentralisedBookIndex.Repo",
"schema": null,
"table": "authors"
}

@ -0,0 +1,78 @@
{
"attributes": [
{
"allow_nil?": false,
"default": "fragment(\"gen_random_uuid()\")",
"generated?": false,
"primary_key?": true,
"references": null,
"size": null,
"source": "id",
"type": "uuid"
},
{
"allow_nil?": false,
"default": "fragment(\"(now() AT TIME ZONE 'utc')\")",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "inserted_at",
"type": "utc_datetime_usec"
},
{
"allow_nil?": false,
"default": "fragment(\"(now() AT TIME ZONE 'utc')\")",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "updated_at",
"type": "utc_datetime_usec"
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": {
"deferrable": false,
"destination_attribute": "id",
"destination_attribute_default": null,
"destination_attribute_generated": null,
"index?": false,
"match_type": null,
"match_with": null,
"multitenancy": {
"attribute": null,
"global": null,
"strategy": null
},
"name": "book_editions_registries_dbi_server_id_fkey",
"on_delete": null,
"on_update": null,
"primary_key?": true,
"schema": "public",
"table": "dbi_servers"
},
"size": null,
"source": "dbi_server_id",
"type": "uuid"
}
],
"base_filter": null,
"check_constraints": [],
"custom_indexes": [],
"custom_statements": [],
"has_create_action": true,
"hash": "9D6D072AA33C51A70415A4C52023811B75A890D6E199786AE992629C47AFE803",
"identities": [],
"multitenancy": {
"attribute": null,
"global": null,
"strategy": null
},
"repo": "Elixir.DecentralisedBookIndex.Repo",
"schema": null,
"table": "book_editions_registries"
}

@ -0,0 +1,137 @@
{
"attributes": [
{
"allow_nil?": false,
"default": "fragment(\"gen_random_uuid()\")",
"generated?": false,
"primary_key?": true,
"references": null,
"size": null,
"source": "id",
"type": "uuid"
},
{
"allow_nil?": false,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "type",
"type": "text"
},
{
"allow_nil?": false,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "bid",
"type": "text"
},
{
"allow_nil?": false,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "order",
"type": "bigint"
},
{
"allow_nil?": false,
"default": "fragment(\"(now() AT TIME ZONE 'utc')\")",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "inserted_at",
"type": "utc_datetime_usec"
},
{
"allow_nil?": false,
"default": "fragment(\"(now() AT TIME ZONE 'utc')\")",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "updated_at",
"type": "utc_datetime_usec"
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": {
"deferrable": false,
"destination_attribute": "id",
"destination_attribute_default": null,
"destination_attribute_generated": null,
"index?": false,
"match_type": null,
"match_with": null,
"multitenancy": {
"attribute": null,
"global": null,
"strategy": null
},
"name": "book_ids_dbi_server_id_fkey",
"on_delete": null,
"on_update": null,
"primary_key?": true,
"schema": "public",
"table": "dbi_servers"
},
"size": null,
"source": "dbi_server_id",
"type": "uuid"
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": {
"deferrable": false,
"destination_attribute": "id",
"destination_attribute_default": null,
"destination_attribute_generated": null,
"index?": true,
"match_type": null,
"match_with": null,
"multitenancy": {
"attribute": null,
"global": null,
"strategy": null
},
"name": "book_ids_book_id_fkey",
"on_delete": "delete",
"on_update": null,
"primary_key?": true,
"schema": "public",
"table": "books"
},
"size": null,
"source": "book_id",
"type": "uuid"
}
],
"base_filter": null,
"check_constraints": [],
"custom_indexes": [],
"custom_statements": [],
"has_create_action": true,
"hash": "7E20C8AA3378E3CDB3216682ABFA0D36A8FFC103623A9F8D0AF38AEE5C73B004",
"identities": [],
"multitenancy": {
"attribute": null,
"global": null,
"strategy": null
},
"repo": "Elixir.DecentralisedBookIndex.Repo",
"schema": null,
"table": "book_ids"
}

@ -0,0 +1,206 @@
{
"attributes": [
{
"allow_nil?": false,
"default": "fragment(\"gen_random_uuid()\")",
"generated?": false,
"primary_key?": true,
"references": null,
"size": null,
"source": "id",
"type": "uuid"
},
{
"allow_nil?": false,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "title",
"type": "text"
},
{
"allow_nil?": false,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "description",
"type": "text"
},
{
"allow_nil?": false,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "published",
"type": "date"
},
{
"allow_nil?": false,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "language",
"type": "text"
},
{
"allow_nil?": false,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "format",
"type": "text"
},
{
"allow_nil?": false,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "page_count",
"type": "bigint"
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "cover_image_url",
"type": "text"
},
{
"allow_nil?": false,
"default": "fragment(\"(now() AT TIME ZONE 'utc')\")",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "inserted_at",
"type": "utc_datetime_usec"
},
{
"allow_nil?": false,
"default": "fragment(\"(now() AT TIME ZONE 'utc')\")",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "updated_at",
"type": "utc_datetime_usec"
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": {
"deferrable": false,
"destination_attribute": "id",
"destination_attribute_default": null,
"destination_attribute_generated": null,
"index?": false,
"match_type": null,
"match_with": null,
"multitenancy": {
"attribute": null,
"global": null,
"strategy": null
},
"name": "books_dbi_server_id_fkey",
"on_delete": null,
"on_update": null,
"primary_key?": true,
"schema": "public",
"table": "dbi_servers"
},
"size": null,
"source": "dbi_server_id",
"type": "uuid"
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": {
"deferrable": false,
"destination_attribute": "id",
"destination_attribute_default": null,
"destination_attribute_generated": null,
"index?": false,
"match_type": null,
"match_with": null,
"multitenancy": {
"attribute": null,
"global": null,
"strategy": null
},
"name": "books_book_editions_registry_id_fkey",
"on_delete": null,
"on_update": null,
"primary_key?": true,
"schema": "public",
"table": "book_editions_registries"
},
"size": null,
"source": "book_editions_registry_id",
"type": "uuid"
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": {
"deferrable": false,
"destination_attribute": "id",
"destination_attribute_default": null,
"destination_attribute_generated": null,
"index?": false,
"match_type": null,
"match_with": null,
"multitenancy": {
"attribute": null,
"global": null,
"strategy": null
},
"name": "books_publisher_id_fkey",
"on_delete": null,
"on_update": null,
"primary_key?": true,
"schema": "public",
"table": "publishers"
},
"size": null,
"source": "publisher_id",
"type": "uuid"
}
],
"base_filter": null,
"check_constraints": [],
"custom_indexes": [],
"custom_statements": [],
"has_create_action": true,
"hash": "D601FB56FC14AD0981B5E4F40F683FF98E84E2103A26F007F932A41E63A0E41D",
"identities": [],
"multitenancy": {
"attribute": null,
"global": null,
"strategy": null
},
"repo": "Elixir.DecentralisedBookIndex.Repo",
"schema": null,
"table": "books"
}

@ -0,0 +1,88 @@
{
"attributes": [
{
"allow_nil?": false,
"default": "fragment(\"gen_random_uuid()\")",
"generated?": false,
"primary_key?": true,
"references": null,
"size": null,
"source": "id",
"type": "uuid"
},
{
"allow_nil?": false,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "name",
"type": "text"
},
{
"allow_nil?": false,
"default": "fragment(\"(now() AT TIME ZONE 'utc')\")",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "inserted_at",
"type": "utc_datetime_usec"
},
{
"allow_nil?": false,
"default": "fragment(\"(now() AT TIME ZONE 'utc')\")",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "updated_at",
"type": "utc_datetime_usec"
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": {
"deferrable": false,
"destination_attribute": "id",
"destination_attribute_default": null,
"destination_attribute_generated": null,
"index?": false,
"match_type": null,
"match_with": null,
"multitenancy": {
"attribute": null,
"global": null,
"strategy": null
},
"name": "publishers_dbi_server_id_fkey",
"on_delete": null,
"on_update": null,
"primary_key?": true,
"schema": "public",
"table": "dbi_servers"
},
"size": null,
"source": "dbi_server_id",
"type": "uuid"
}
],
"base_filter": null,
"check_constraints": [],
"custom_indexes": [],
"custom_statements": [],
"has_create_action": true,
"hash": "8E1966B940E38A6C277C78F1825C7C03A2400AE4AEF7134DC1F67EC2190EC865",
"identities": [],
"multitenancy": {
"attribute": null,
"global": null,
"strategy": null
},
"repo": "Elixir.DecentralisedBookIndex.Repo",
"schema": null,
"table": "publishers"
}
Loading…
Cancel
Save