ash_postgres/priv/resource_snapshots/test_repo/posts/20221125171150.json
Zach Daniel 059837651d improvement: add unique constraints to changeset for custom unique indexes
improvement: separate out concurrent index creations and do them in a separate transaction
2022-11-25 14:06:22 -05:00

251 lines
No EOL
5.4 KiB
JSON

{
"attributes": [
{
"allow_nil?": false,
"default": "fragment(\"uuid_generate_v4()\")",
"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": "title",
"type": "text"
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "score",
"type": "bigint"
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "public",
"type": "boolean"
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "category",
"type": "citext"
},
{
"allow_nil?": true,
"default": "\"sponsored\"",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "type",
"type": "text"
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "price",
"type": "bigint"
},
{
"allow_nil?": true,
"default": "\"0\"",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "decimal",
"type": "decimal"
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "status",
"type": "text"
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "status_enum",
"type": "status"
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "point",
"type": [
"array",
"float"
]
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "uniq_one",
"type": "text"
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "uniq_two",
"type": "text"
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "uniq_custom_one",
"type": "text"
},
{
"allow_nil?": true,
"default": "nil",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "uniq_custom_two",
"type": "text"
},
{
"allow_nil?": false,
"default": "fragment(\"now()\")",
"generated?": false,
"primary_key?": false,
"references": null,
"size": null,
"source": "created_at",
"type": "utc_datetime_usec"
},
{
"allow_nil?": false,
"default": "fragment(\"now()\")",
"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": {
"destination_attribute": "id",
"destination_attribute_default": null,
"destination_attribute_generated": null,
"multitenancy": {
"attribute": null,
"global": null,
"strategy": null
},
"name": "posts_author_id_fkey",
"on_delete": null,
"on_update": null,
"schema": "public",
"table": "authors"
},
"size": null,
"source": "author_id",
"type": "uuid"
}
],
"base_filter": "type = 'sponsored'",
"check_constraints": [
{
"attribute": [
"price"
],
"base_filter": "type = 'sponsored'",
"check": "price > 0",
"name": "price_must_be_positive"
}
],
"custom_indexes": [
{
"concurrently": true,
"fields": [
"uniq_custom_one",
"uniq_custom_two"
],
"include": null,
"message": "dude what the heck",
"name": null,
"prefix": null,
"table": null,
"unique": true,
"using": null,
"where": null
}
],
"custom_statements": [],
"has_create_action": true,
"hash": "8B7D29454AA96370C4F8CAD435A789ED96658ACFC74612B288D9EC63B81D2262",
"identities": [
{
"base_filter": "type = 'sponsored'",
"index_name": "posts_uniq_one_and_two_index",
"keys": [
"uniq_one",
"uniq_two"
],
"name": "uniq_one_and_two"
}
],
"multitenancy": {
"attribute": null,
"global": null,
"strategy": null
},
"repo": "Elixir.AshPostgres.TestRepo",
"schema": null,
"table": "posts"
}