From b509dc4ea37134c6664a4ecc1d713a0a85e87d6d Mon Sep 17 00:00:00 2001 From: carla Date: Wed, 19 Nov 2025 17:27:26 +0100 Subject: [PATCH] chore: add migration for show in overview flag --- ..._add_show_in_overview_to_custom_fields.exs | 21 ++++ .../repo/custom_fields/20251119160509.json | 118 ++++++++++++++++++ 2 files changed, 139 insertions(+) create mode 100644 priv/repo/migrations/20251119160509_add_show_in_overview_to_custom_fields.exs create mode 100644 priv/resource_snapshots/repo/custom_fields/20251119160509.json diff --git a/priv/repo/migrations/20251119160509_add_show_in_overview_to_custom_fields.exs b/priv/repo/migrations/20251119160509_add_show_in_overview_to_custom_fields.exs new file mode 100644 index 0000000..32b4801 --- /dev/null +++ b/priv/repo/migrations/20251119160509_add_show_in_overview_to_custom_fields.exs @@ -0,0 +1,21 @@ +defmodule Mv.Repo.Migrations.AddShowInOverviewToCustomFields do + @moduledoc """ + Updates resources based on their most recent snapshots. + + This file was autogenerated with `mix ash_postgres.generate_migrations` + """ + + use Ecto.Migration + + def up do + alter table(:custom_fields) do + add :show_in_overview, :boolean, null: false, default: true + end + end + + def down do + alter table(:custom_fields) do + remove :show_in_overview + end + end +end diff --git a/priv/resource_snapshots/repo/custom_fields/20251119160509.json b/priv/resource_snapshots/repo/custom_fields/20251119160509.json new file mode 100644 index 0000000..718fe51 --- /dev/null +++ b/priv/resource_snapshots/repo/custom_fields/20251119160509.json @@ -0,0 +1,118 @@ +{ + "attributes": [ + { + "allow_nil?": false, + "default": "fragment(\"gen_random_uuid()\")", + "generated?": false, + "precision": null, + "primary_key?": true, + "references": null, + "scale": null, + "size": null, + "source": "id", + "type": "uuid" + }, + { + "allow_nil?": false, + "default": "nil", + "generated?": false, + "precision": null, + "primary_key?": false, + "references": null, + "scale": null, + "size": null, + "source": "name", + "type": "text" + }, + { + "allow_nil?": false, + "default": "nil", + "generated?": false, + "precision": null, + "primary_key?": false, + "references": null, + "scale": null, + "size": null, + "source": "value_type", + "type": "text" + }, + { + "allow_nil?": true, + "default": "nil", + "generated?": false, + "precision": null, + "primary_key?": false, + "references": null, + "scale": null, + "size": null, + "source": "description", + "type": "text" + }, + { + "allow_nil?": false, + "default": "false", + "generated?": false, + "precision": null, + "primary_key?": false, + "references": null, + "scale": null, + "size": null, + "source": "immutable", + "type": "boolean" + }, + { + "allow_nil?": false, + "default": "false", + "generated?": false, + "precision": null, + "primary_key?": false, + "references": null, + "scale": null, + "size": null, + "source": "required", + "type": "boolean" + }, + { + "allow_nil?": false, + "default": "false", + "generated?": false, + "precision": null, + "primary_key?": false, + "references": null, + "scale": null, + "size": null, + "source": "show_in_overview", + "type": "boolean" + } + ], + "base_filter": null, + "check_constraints": [], + "custom_indexes": [], + "custom_statements": [], + "has_create_action": true, + "hash": "9FBFC42DA896058F88DEDAE774614919222BF2EF2F8CB27386D02C2CE67F03DE", + "identities": [ + { + "all_tenants?": false, + "base_filter": null, + "index_name": "custom_fields_unique_name_index", + "keys": [ + { + "type": "atom", + "value": "name" + } + ], + "name": "unique_name", + "nils_distinct?": true, + "where": null + } + ], + "multitenancy": { + "attribute": null, + "global": null, + "strategy": null + }, + "repo": "Elixir.Mv.Repo", + "schema": null, + "table": "custom_fields" +} \ No newline at end of file