mirror of
https://github.com/ash-project/ash_hq.git
synced 2024-09-20 05:13:23 +12:00
improvement: add migrations update deps
This commit is contained in:
parent
5a6373307f
commit
a39d1bd824
3 changed files with 146 additions and 3 deletions
6
mix.lock
6
mix.lock
|
@ -1,7 +1,7 @@
|
||||||
%{
|
%{
|
||||||
"ash": {:git, "https://github.com/ash-project/ash.git", "a4770e35fda32786cb5829a519d6f1ca3d68d33f", []},
|
"ash": {:git, "https://github.com/ash-project/ash.git", "c21c5e6ae74877827f8ad93619efecd54112dba3", []},
|
||||||
"ash_phoenix": {:git, "https://github.com/ash-project/ash_phoenix.git", "4b9ec85d5a4702cd68920d77b6e4c8523b751c9d", []},
|
"ash_phoenix": {:git, "https://github.com/ash-project/ash_phoenix.git", "f5390fb8dd44399b14e4027a2f97ea70a07e62ed", []},
|
||||||
"ash_postgres": {:git, "https://github.com/ash-project/ash_postgres.git", "e20e68e73af334dec540786b9275fcdf0cb86731", []},
|
"ash_postgres": {:git, "https://github.com/ash-project/ash_postgres.git", "b561c4f8d4216ae57503d2f320bcc67d64a29d63", []},
|
||||||
"bcrypt_elixir": {:hex, :bcrypt_elixir, "3.0.1", "9be815469e6bfefec40fa74658ecbbe6897acfb57614df1416eeccd4903f602c", [:make, :mix], [{:comeonin, "~> 5.3", [hex: :comeonin, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "486bb95efb645d1efc6794c1ddd776a186a9a713abf06f45708a6ce324fb96cf"},
|
"bcrypt_elixir": {:hex, :bcrypt_elixir, "3.0.1", "9be815469e6bfefec40fa74658ecbbe6897acfb57614df1416eeccd4903f602c", [:make, :mix], [{:comeonin, "~> 5.3", [hex: :comeonin, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "486bb95efb645d1efc6794c1ddd776a186a9a713abf06f45708a6ce324fb96cf"},
|
||||||
"bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"},
|
"bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"},
|
||||||
"castore": {:hex, :castore, "0.1.17", "ba672681de4e51ed8ec1f74ed624d104c0db72742ea1a5e74edbc770c815182f", [:mix], [], "hexpm", "d9844227ed52d26e7519224525cb6868650c272d4a3d327ce3ca5570c12163f9"},
|
"castore": {:hex, :castore, "0.1.17", "ba672681de4e51ed8ec1f74ed624d104c0db72742ea1a5e74edbc770c815182f", [:mix], [], "hexpm", "d9844227ed52d26e7519224525cb6868650c272d4a3d327ce3ca5570c12163f9"},
|
||||||
|
|
21
priv/repo/migrations/20220816042933_migrate_resources20.exs
Normal file
21
priv/repo/migrations/20220816042933_migrate_resources20.exs
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
defmodule AshHq.Repo.Migrations.MigrateResources20 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(:library_versions) do
|
||||||
|
add :branch, :boolean, null: false, default: false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def down do
|
||||||
|
alter table(:library_versions) do
|
||||||
|
remove :branch
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,122 @@
|
||||||
|
{
|
||||||
|
"attributes": [
|
||||||
|
{
|
||||||
|
"allow_nil?": false,
|
||||||
|
"default": "nil",
|
||||||
|
"generated?": false,
|
||||||
|
"primary_key?": false,
|
||||||
|
"references": null,
|
||||||
|
"size": null,
|
||||||
|
"source": "sanitized_version",
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_nil?": false,
|
||||||
|
"default": "fragment(\"uuid_generate_v4()\")",
|
||||||
|
"generated?": false,
|
||||||
|
"primary_key?": true,
|
||||||
|
"references": null,
|
||||||
|
"size": null,
|
||||||
|
"source": "id",
|
||||||
|
"type": "uuid"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_nil?": false,
|
||||||
|
"default": "nil",
|
||||||
|
"generated?": false,
|
||||||
|
"primary_key?": false,
|
||||||
|
"references": null,
|
||||||
|
"size": null,
|
||||||
|
"source": "version",
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_nil?": false,
|
||||||
|
"default": "false",
|
||||||
|
"generated?": false,
|
||||||
|
"primary_key?": false,
|
||||||
|
"references": null,
|
||||||
|
"size": null,
|
||||||
|
"source": "branch",
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_nil?": true,
|
||||||
|
"default": "nil",
|
||||||
|
"generated?": false,
|
||||||
|
"primary_key?": false,
|
||||||
|
"references": null,
|
||||||
|
"size": null,
|
||||||
|
"source": "default_guide",
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_nil?": false,
|
||||||
|
"default": "nil",
|
||||||
|
"generated?": false,
|
||||||
|
"primary_key?": false,
|
||||||
|
"references": {
|
||||||
|
"destination_field": "id",
|
||||||
|
"destination_field_default": null,
|
||||||
|
"destination_field_generated": null,
|
||||||
|
"multitenancy": {
|
||||||
|
"attribute": null,
|
||||||
|
"global": null,
|
||||||
|
"strategy": null
|
||||||
|
},
|
||||||
|
"name": "library_versions_library_id_fkey",
|
||||||
|
"on_delete": null,
|
||||||
|
"on_update": null,
|
||||||
|
"schema": "public",
|
||||||
|
"table": "libraries"
|
||||||
|
},
|
||||||
|
"size": null,
|
||||||
|
"source": "library_id",
|
||||||
|
"type": "uuid"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"base_filter": null,
|
||||||
|
"check_constraints": [],
|
||||||
|
"custom_indexes": [],
|
||||||
|
"custom_statements": [
|
||||||
|
{
|
||||||
|
"code?": false,
|
||||||
|
"down": "DROP INDEX library_versions_name_lower_index;",
|
||||||
|
"name": "name_index",
|
||||||
|
"up": "CREATE INDEX library_versions_name_lower_index ON library_versions(lower(version));\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code?": false,
|
||||||
|
"down": "DROP INDEX library_versions_name_trigram_index;",
|
||||||
|
"name": "trigram_index",
|
||||||
|
"up": "CREATE INDEX library_versions_name_trigram_index ON library_versions USING GIST (version gist_trgm_ops);\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code?": false,
|
||||||
|
"down": "DROP INDEX library_versions_search_index;",
|
||||||
|
"name": "search_index",
|
||||||
|
"up": "CREATE INDEX library_versions_search_index ON library_versions USING GIN((\n to_tsvector('english', version)\n));\n"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"has_create_action": true,
|
||||||
|
"hash": "7EC011BE577203A1B3276F1265AF51D192E7BB5855112087DDDE162145609BD9",
|
||||||
|
"identities": [
|
||||||
|
{
|
||||||
|
"base_filter": null,
|
||||||
|
"index_name": "library_versions_unique_version_for_library_index",
|
||||||
|
"keys": [
|
||||||
|
"library_id",
|
||||||
|
"version"
|
||||||
|
],
|
||||||
|
"name": "unique_version_for_library"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"multitenancy": {
|
||||||
|
"attribute": null,
|
||||||
|
"global": null,
|
||||||
|
"strategy": null
|
||||||
|
},
|
||||||
|
"repo": "Elixir.AshHq.Repo",
|
||||||
|
"schema": null,
|
||||||
|
"table": "library_versions"
|
||||||
|
}
|
Loading…
Reference in a new issue