ash_postgres/priv/resource_snapshots/test_repo/posts/20240327211150.json

342 lines
No EOL
7.5 KiB
JSON

{
"attributes": [
{
"default": "fragment(\"gen_random_uuid()\")",
"size": null,
"type": "uuid",
"source": "id",
"references": null,
"primary_key?": true,
"allow_nil?": false,
"generated?": false
},
{
"default": "nil",
"size": null,
"type": "text",
"source": "title_column",
"references": null,
"primary_key?": false,
"allow_nil?": true,
"generated?": false
},
{
"default": "nil",
"size": null,
"type": "bigint",
"source": "score",
"references": null,
"primary_key?": false,
"allow_nil?": true,
"generated?": false
},
{
"default": "nil",
"size": null,
"type": "boolean",
"source": "public",
"references": null,
"primary_key?": false,
"allow_nil?": true,
"generated?": false
},
{
"default": "nil",
"size": null,
"type": "citext",
"source": "category",
"references": null,
"primary_key?": false,
"allow_nil?": true,
"generated?": false
},
{
"default": "\"sponsored\"",
"size": null,
"type": "text",
"source": "type",
"references": null,
"primary_key?": false,
"allow_nil?": true,
"generated?": false
},
{
"default": "nil",
"size": null,
"type": "bigint",
"source": "price",
"references": null,
"primary_key?": false,
"allow_nil?": true,
"generated?": false
},
{
"default": "\"0\"",
"size": null,
"type": "decimal",
"source": "decimal",
"references": null,
"primary_key?": false,
"allow_nil?": true,
"generated?": false
},
{
"default": "nil",
"size": null,
"type": "text",
"source": "status",
"references": null,
"primary_key?": false,
"allow_nil?": true,
"generated?": false
},
{
"default": "nil",
"size": null,
"type": "status",
"source": "status_enum",
"references": null,
"primary_key?": false,
"allow_nil?": true,
"generated?": false
},
{
"default": "nil",
"size": null,
"type": [
"array",
"float"
],
"source": "point",
"references": null,
"primary_key?": false,
"allow_nil?": true,
"generated?": false
},
{
"default": "nil",
"size": null,
"type": "custom_point",
"source": "composite_point",
"references": null,
"primary_key?": false,
"allow_nil?": true,
"generated?": false
},
{
"default": "nil",
"size": null,
"type": "map",
"source": "stuff",
"references": null,
"primary_key?": false,
"allow_nil?": true,
"generated?": false
},
{
"default": "nil",
"size": null,
"type": [
"array",
"map"
],
"source": "list_of_stuff",
"references": null,
"primary_key?": false,
"allow_nil?": true,
"generated?": false
},
{
"default": "nil",
"size": null,
"type": "text",
"source": "uniq_one",
"references": null,
"primary_key?": false,
"allow_nil?": true,
"generated?": false
},
{
"default": "nil",
"size": null,
"type": "text",
"source": "uniq_two",
"references": null,
"primary_key?": false,
"allow_nil?": true,
"generated?": false
},
{
"default": "nil",
"size": null,
"type": "text",
"source": "uniq_custom_one",
"references": null,
"primary_key?": false,
"allow_nil?": true,
"generated?": false
},
{
"default": "nil",
"size": null,
"type": "text",
"source": "uniq_custom_two",
"references": null,
"primary_key?": false,
"allow_nil?": true,
"generated?": false
},
{
"default": "nil",
"size": null,
"type": [
"array",
"text"
],
"source": "list_containing_nils",
"references": null,
"primary_key?": false,
"allow_nil?": true,
"generated?": false
},
{
"default": "fragment(\"now()\")",
"size": null,
"type": "utc_datetime_usec",
"source": "created_at",
"references": null,
"primary_key?": false,
"allow_nil?": false,
"generated?": false
},
{
"default": "fragment(\"now()\")",
"size": null,
"type": "utc_datetime_usec",
"source": "updated_at",
"references": null,
"primary_key?": false,
"allow_nil?": false,
"generated?": false
},
{
"default": "nil",
"size": null,
"type": "uuid",
"source": "organization_id",
"references": {
"name": "posts_organization_id_fkey",
"table": "orgs",
"multitenancy": {
"global": null,
"attribute": null,
"strategy": null
},
"primary_key?": true,
"destination_attribute": "id",
"schema": "public",
"deferrable": false,
"destination_attribute_default": null,
"destination_attribute_generated": null,
"on_delete": null,
"on_update": null,
"match_with": null,
"match_type": null
},
"primary_key?": false,
"allow_nil?": true,
"generated?": false
},
{
"default": "nil",
"size": null,
"type": "uuid",
"source": "author_id",
"references": {
"name": "posts_author_id_fkey",
"table": "authors",
"multitenancy": {
"global": null,
"attribute": null,
"strategy": null
},
"primary_key?": true,
"destination_attribute": "id",
"schema": "public",
"deferrable": false,
"destination_attribute_default": null,
"destination_attribute_generated": null,
"on_delete": null,
"on_update": null,
"match_with": null,
"match_type": null
},
"primary_key?": false,
"allow_nil?": true,
"generated?": false
}
],
"table": "posts",
"hash": "6BDD92F513B8CE90C615521D5D28BF89F5DFA5C70F7A889EBEB733CA4163B75E",
"repo": "Elixir.AshPostgres.TestRepo",
"multitenancy": {
"global": null,
"attribute": null,
"strategy": null
},
"schema": null,
"identities": [
{
"name": "uniq_one_and_two",
"keys": [
"uniq_one",
"uniq_two"
],
"base_filter": "type = 'sponsored'",
"all_tenants?": false,
"index_name": "posts_uniq_one_and_two_index"
}
],
"has_create_action": true,
"custom_indexes": [
{
"message": "dude what the heck",
"name": null,
"table": null,
"include": null,
"fields": [
{
"type": "atom",
"value": "uniq_custom_one"
},
{
"type": "atom",
"value": "uniq_custom_two"
}
],
"prefix": null,
"where": null,
"unique": true,
"concurrently": true,
"all_tenants?": false,
"error_fields": [
"uniq_custom_one",
"uniq_custom_two"
],
"nulls_distinct": true,
"using": null
}
],
"custom_statements": [],
"base_filter": "type = 'sponsored'",
"check_constraints": [
{
"name": "price_must_be_positive",
"check": "price > 0",
"attribute": [
"price"
],
"base_filter": "type = 'sponsored'"
}
]
}