2022-07-07 06:44:18 +12:00
|
|
|
{
|
|
|
|
"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?": 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": {
|
2022-08-19 06:56:36 +12:00
|
|
|
"destination_attribute": "id",
|
|
|
|
"destination_attribute_default": null,
|
|
|
|
"destination_attribute_generated": null,
|
2022-07-07 06:44:18 +12:00
|
|
|
"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": [],
|
2022-08-06 07:27:22 +12:00
|
|
|
"custom_statements": [],
|
2022-07-07 06:44:18 +12:00
|
|
|
"has_create_action": true,
|
2022-08-06 07:27:22 +12:00
|
|
|
"hash": "4B5B1187A639B9AB2617FFB8CC5117EE844C7079B1D6EC54CDE7B527B33DA988",
|
2022-07-07 06:44:18 +12:00
|
|
|
"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"
|
|
|
|
}
|