mirror of
https://github.com/ash-project/ash_postgres.git
synced 2024-09-20 13:33:50 +12:00
342 lines
No EOL
7.5 KiB
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() 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": "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": "987D3631D8B6C31C1BA0E5CCF93DDECAFA1CA45768B37AFDEEA9000A09670EF7",
|
|
"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,
|
|
"prefix": null,
|
|
"where": null,
|
|
"fields": [
|
|
{
|
|
"type": "atom",
|
|
"value": "uniq_custom_one"
|
|
},
|
|
{
|
|
"type": "atom",
|
|
"value": "uniq_custom_two"
|
|
}
|
|
],
|
|
"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'"
|
|
}
|
|
]
|
|
} |