mirror of
https://github.com/ash-project/ash_postgres.git
synced 2024-09-20 21:43:12 +12:00
289 lines
6.3 KiB
JSON
289 lines
6.3 KiB
JSON
|
{
|
||
|
"attributes": [
|
||
|
{
|
||
|
"default": "fragment(\"uuid_generate_v4()\")",
|
||
|
"size": null,
|
||
|
"type": "uuid",
|
||
|
"source": "id",
|
||
|
"references": null,
|
||
|
"allow_nil?": false,
|
||
|
"generated?": false,
|
||
|
"primary_key?": true
|
||
|
},
|
||
|
{
|
||
|
"default": "nil",
|
||
|
"size": null,
|
||
|
"type": "text",
|
||
|
"source": "title",
|
||
|
"references": null,
|
||
|
"allow_nil?": true,
|
||
|
"generated?": false,
|
||
|
"primary_key?": false
|
||
|
},
|
||
|
{
|
||
|
"default": "nil",
|
||
|
"size": null,
|
||
|
"type": "bigint",
|
||
|
"source": "score",
|
||
|
"references": null,
|
||
|
"allow_nil?": true,
|
||
|
"generated?": false,
|
||
|
"primary_key?": false
|
||
|
},
|
||
|
{
|
||
|
"default": "nil",
|
||
|
"size": null,
|
||
|
"type": "boolean",
|
||
|
"source": "public",
|
||
|
"references": null,
|
||
|
"allow_nil?": true,
|
||
|
"generated?": false,
|
||
|
"primary_key?": false
|
||
|
},
|
||
|
{
|
||
|
"default": "nil",
|
||
|
"size": null,
|
||
|
"type": "citext",
|
||
|
"source": "category",
|
||
|
"references": null,
|
||
|
"allow_nil?": true,
|
||
|
"generated?": false,
|
||
|
"primary_key?": false
|
||
|
},
|
||
|
{
|
||
|
"default": "\"sponsored\"",
|
||
|
"size": null,
|
||
|
"type": "text",
|
||
|
"source": "type",
|
||
|
"references": null,
|
||
|
"allow_nil?": true,
|
||
|
"generated?": false,
|
||
|
"primary_key?": false
|
||
|
},
|
||
|
{
|
||
|
"default": "nil",
|
||
|
"size": null,
|
||
|
"type": "bigint",
|
||
|
"source": "price",
|
||
|
"references": null,
|
||
|
"allow_nil?": true,
|
||
|
"generated?": false,
|
||
|
"primary_key?": false
|
||
|
},
|
||
|
{
|
||
|
"default": "\"0\"",
|
||
|
"size": null,
|
||
|
"type": "decimal",
|
||
|
"source": "decimal",
|
||
|
"references": null,
|
||
|
"allow_nil?": true,
|
||
|
"generated?": false,
|
||
|
"primary_key?": false
|
||
|
},
|
||
|
{
|
||
|
"default": "nil",
|
||
|
"size": null,
|
||
|
"type": "text",
|
||
|
"source": "status",
|
||
|
"references": null,
|
||
|
"allow_nil?": true,
|
||
|
"generated?": false,
|
||
|
"primary_key?": false
|
||
|
},
|
||
|
{
|
||
|
"default": "nil",
|
||
|
"size": null,
|
||
|
"type": "status",
|
||
|
"source": "status_enum",
|
||
|
"references": null,
|
||
|
"allow_nil?": true,
|
||
|
"generated?": false,
|
||
|
"primary_key?": false
|
||
|
},
|
||
|
{
|
||
|
"default": "nil",
|
||
|
"size": null,
|
||
|
"type": [
|
||
|
"array",
|
||
|
"float"
|
||
|
],
|
||
|
"source": "point",
|
||
|
"references": null,
|
||
|
"allow_nil?": true,
|
||
|
"generated?": false,
|
||
|
"primary_key?": false
|
||
|
},
|
||
|
{
|
||
|
"default": "nil",
|
||
|
"size": null,
|
||
|
"type": "map",
|
||
|
"source": "stuff",
|
||
|
"references": null,
|
||
|
"allow_nil?": true,
|
||
|
"generated?": false,
|
||
|
"primary_key?": false
|
||
|
},
|
||
|
{
|
||
|
"default": "nil",
|
||
|
"size": null,
|
||
|
"type": "text",
|
||
|
"source": "uniq_one",
|
||
|
"references": null,
|
||
|
"allow_nil?": true,
|
||
|
"generated?": false,
|
||
|
"primary_key?": false
|
||
|
},
|
||
|
{
|
||
|
"default": "nil",
|
||
|
"size": null,
|
||
|
"type": "text",
|
||
|
"source": "uniq_two",
|
||
|
"references": null,
|
||
|
"allow_nil?": true,
|
||
|
"generated?": false,
|
||
|
"primary_key?": false
|
||
|
},
|
||
|
{
|
||
|
"default": "nil",
|
||
|
"size": null,
|
||
|
"type": "text",
|
||
|
"source": "uniq_custom_one",
|
||
|
"references": null,
|
||
|
"allow_nil?": true,
|
||
|
"generated?": false,
|
||
|
"primary_key?": false
|
||
|
},
|
||
|
{
|
||
|
"default": "nil",
|
||
|
"size": null,
|
||
|
"type": "text",
|
||
|
"source": "uniq_custom_two",
|
||
|
"references": null,
|
||
|
"allow_nil?": true,
|
||
|
"generated?": false,
|
||
|
"primary_key?": false
|
||
|
},
|
||
|
{
|
||
|
"default": "fragment(\"now()\")",
|
||
|
"size": null,
|
||
|
"type": "utc_datetime_usec",
|
||
|
"source": "created_at",
|
||
|
"references": null,
|
||
|
"allow_nil?": false,
|
||
|
"generated?": false,
|
||
|
"primary_key?": false
|
||
|
},
|
||
|
{
|
||
|
"default": "fragment(\"now()\")",
|
||
|
"size": null,
|
||
|
"type": "utc_datetime_usec",
|
||
|
"source": "updated_at",
|
||
|
"references": null,
|
||
|
"allow_nil?": false,
|
||
|
"generated?": false,
|
||
|
"primary_key?": false
|
||
|
},
|
||
|
{
|
||
|
"default": "nil",
|
||
|
"size": null,
|
||
|
"type": "uuid",
|
||
|
"source": "organization_id",
|
||
|
"references": {
|
||
|
"name": "posts_organization_id_fkey",
|
||
|
"table": "orgs",
|
||
|
"schema": "public",
|
||
|
"destination_attribute": "id",
|
||
|
"primary_key?": true,
|
||
|
"multitenancy": {
|
||
|
"global": null,
|
||
|
"strategy": null,
|
||
|
"attribute": null
|
||
|
},
|
||
|
"deferrable": false,
|
||
|
"destination_attribute_default": null,
|
||
|
"destination_attribute_generated": null,
|
||
|
"on_delete": null,
|
||
|
"on_update": null
|
||
|
},
|
||
|
"allow_nil?": true,
|
||
|
"generated?": false,
|
||
|
"primary_key?": false
|
||
|
},
|
||
|
{
|
||
|
"default": "nil",
|
||
|
"size": null,
|
||
|
"type": "uuid",
|
||
|
"source": "author_id",
|
||
|
"references": {
|
||
|
"name": "posts_author_id_fkey",
|
||
|
"table": "authors",
|
||
|
"schema": "public",
|
||
|
"destination_attribute": "id",
|
||
|
"primary_key?": true,
|
||
|
"multitenancy": {
|
||
|
"global": null,
|
||
|
"strategy": null,
|
||
|
"attribute": null
|
||
|
},
|
||
|
"deferrable": false,
|
||
|
"destination_attribute_default": null,
|
||
|
"destination_attribute_generated": null,
|
||
|
"on_delete": null,
|
||
|
"on_update": null
|
||
|
},
|
||
|
"allow_nil?": true,
|
||
|
"generated?": false,
|
||
|
"primary_key?": false
|
||
|
}
|
||
|
],
|
||
|
"table": "posts",
|
||
|
"hash": "B039FC2340F75D92FE19FC2E8682AAAE08D942D413D981CC61ECA1FE8EBCCFF8",
|
||
|
"repo": "Elixir.AshPostgres.TestRepo",
|
||
|
"identities": [
|
||
|
{
|
||
|
"name": "uniq_one_and_two",
|
||
|
"keys": [
|
||
|
"uniq_one",
|
||
|
"uniq_two"
|
||
|
],
|
||
|
"base_filter": "type = 'sponsored'",
|
||
|
"index_name": "posts_uniq_one_and_two_index"
|
||
|
}
|
||
|
],
|
||
|
"schema": null,
|
||
|
"multitenancy": {
|
||
|
"global": null,
|
||
|
"strategy": null,
|
||
|
"attribute": null
|
||
|
},
|
||
|
"base_filter": "type = 'sponsored'",
|
||
|
"check_constraints": [
|
||
|
{
|
||
|
"name": "price_must_be_positive",
|
||
|
"check": "price > 0",
|
||
|
"attribute": [
|
||
|
"price"
|
||
|
],
|
||
|
"base_filter": "type = 'sponsored'"
|
||
|
}
|
||
|
],
|
||
|
"custom_indexes": [
|
||
|
{
|
||
|
"message": "dude what the heck",
|
||
|
"name": null,
|
||
|
"table": null,
|
||
|
"include": null,
|
||
|
"prefix": null,
|
||
|
"fields": [
|
||
|
"uniq_custom_one",
|
||
|
"uniq_custom_two"
|
||
|
],
|
||
|
"where": null,
|
||
|
"unique": true,
|
||
|
"concurrently": true,
|
||
|
"using": null
|
||
|
}
|
||
|
],
|
||
|
"custom_statements": [],
|
||
|
"has_create_action": true
|
||
|
}
|