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

398 lines
No EOL
8.8 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": "timestamptz(6)",
"source": "datetime",
"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": "text",
"source": "uniq_on_upper",
"references": null,
"primary_key?": false,
"allow_nil?": true,
"generated?": false
},
{
"default": "nil",
"size": null,
"type": "text",
"source": "uniq_if_contains_foo",
"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() AT TIME ZONE 'utc')\")",
"size": null,
"type": "utc_datetime_usec",
"source": "created_at",
"references": null,
"primary_key?": false,
"allow_nil?": false,
"generated?": false
},
{
"default": "fragment(\"(now() AT TIME ZONE 'utc')\")",
"size": null,
"type": "timestamptz(6)",
"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",
"schema": "public",
"destination_attribute": "id",
"multitenancy": {
"global": null,
"strategy": null,
"attribute": null
},
"primary_key?": true,
"on_update": null,
"on_delete": null,
"deferrable": false,
"index?": false,
"destination_attribute_default": null,
"destination_attribute_generated": 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",
"schema": "public",
"destination_attribute": "id",
"multitenancy": {
"global": null,
"strategy": null,
"attribute": null
},
"primary_key?": true,
"on_update": null,
"on_delete": null,
"deferrable": false,
"index?": false,
"destination_attribute_default": null,
"destination_attribute_generated": null,
"match_with": null,
"match_type": null
},
"primary_key?": false,
"allow_nil?": true,
"generated?": false
}
],
"table": "posts",
"hash": "C7F77A2A5EEB68BD76CA1CCA3F871489E335DEB7887D17E8C300DB90E27F5545",
"repo": "Elixir.AshPostgres.TestRepo",
"schema": null,
"identities": [
{
"name": "uniq_if_contains_foo",
"keys": [
"uniq_if_contains_foo"
],
"where": "(uniq_if_contains_foo LIKE '%foo%')",
"nils_distinct?": true,
"all_tenants?": false,
"base_filter": "type = 'sponsored'",
"index_name": "posts_uniq_if_contains_foo_index"
},
{
"name": "uniq_on_upper",
"keys": [
"(UPPER(uniq_on_upper))"
],
"where": null,
"nils_distinct?": true,
"all_tenants?": false,
"base_filter": "type = 'sponsored'",
"index_name": "posts_uniq_on_upper_index"
},
{
"name": "uniq_one_and_two",
"keys": [
"uniq_one",
"uniq_two"
],
"where": null,
"nils_distinct?": true,
"all_tenants?": false,
"base_filter": "type = 'sponsored'",
"index_name": "posts_uniq_one_and_two_index"
}
],
"multitenancy": {
"global": null,
"strategy": null,
"attribute": null
},
"base_filter": "type = 'sponsored'",
"custom_indexes": [
{
"message": "dude what the heck",
"name": null,
"table": null,
"include": null,
"prefix": null,
"fields": [
{
"type": "atom",
"value": "uniq_custom_one"
},
{
"type": "atom",
"value": "uniq_custom_two"
}
],
"where": null,
"unique": true,
"using": null,
"all_tenants?": false,
"concurrently": true,
"error_fields": [
"uniq_custom_one",
"uniq_custom_two"
],
"nulls_distinct": true
}
],
"custom_statements": [],
"check_constraints": [
{
"name": "price_must_be_positive",
"check": "price > 0",
"attribute": [
"price"
],
"base_filter": "type = 'sponsored'"
}
],
"has_create_action": true
}