-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improvement: support PhoenixHTML 4.0
fix: ensure starting state of dropdowns is honored
- Loading branch information
1 parent
0e86459
commit 92f9997
Showing
9 changed files
with
451 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
defmodule Demo.Repo.Migrations.MigrateResources2 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(:users) do | ||
add :type, :text | ||
end | ||
|
||
drop_if_exists unique_index(:users, [:first_name, :last_name], | ||
name: "users_representative_name_index" | ||
) | ||
|
||
create unique_index(:users, [:id, :first_name, :last_name], | ||
where: "representative = true", | ||
name: "users_representative_name_index" | ||
) | ||
end | ||
|
||
def down do | ||
drop_if_exists unique_index(:users, [:id, :first_name, :last_name], | ||
name: "users_representative_name_index" | ||
) | ||
|
||
create unique_index(:users, [:id, :first_name, :last_name], | ||
where: "representative = true", | ||
name: "users_representative_name_index" | ||
) | ||
|
||
alter table(:users) do | ||
remove :type | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
defmodule Demo.Repo.Migrations.MigrateResources3 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(:users) do | ||
modify :type, :text, default: "type1" | ||
add :types, {:array, :text} | ||
end | ||
end | ||
|
||
def down do | ||
alter table(:users) do | ||
remove :types | ||
modify :type, :text, default: nil | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
{ | ||
"attributes": [ | ||
{ | ||
"default": "fragment(\"uuid_generate_v4()\")", | ||
"size": null, | ||
"type": "uuid", | ||
"source": "id", | ||
"references": null, | ||
"allow_nil?": false, | ||
"primary_key?": true, | ||
"generated?": false | ||
}, | ||
{ | ||
"default": "nil", | ||
"size": null, | ||
"type": "text", | ||
"source": "first_name", | ||
"references": null, | ||
"allow_nil?": true, | ||
"primary_key?": false, | ||
"generated?": false | ||
}, | ||
{ | ||
"default": "nil", | ||
"size": null, | ||
"type": "text", | ||
"source": "last_name", | ||
"references": null, | ||
"allow_nil?": true, | ||
"primary_key?": false, | ||
"generated?": false | ||
}, | ||
{ | ||
"default": "nil", | ||
"size": null, | ||
"type": "boolean", | ||
"source": "representative", | ||
"references": null, | ||
"allow_nil?": true, | ||
"primary_key?": false, | ||
"generated?": false | ||
}, | ||
{ | ||
"default": "false", | ||
"size": null, | ||
"type": "boolean", | ||
"source": "admin", | ||
"references": null, | ||
"allow_nil?": false, | ||
"primary_key?": false, | ||
"generated?": false | ||
}, | ||
{ | ||
"default": "nil", | ||
"size": null, | ||
"type": "text", | ||
"source": "api_key", | ||
"references": null, | ||
"allow_nil?": true, | ||
"primary_key?": false, | ||
"generated?": false | ||
}, | ||
{ | ||
"default": "nil", | ||
"size": null, | ||
"type": "date", | ||
"source": "date_of_birth", | ||
"references": null, | ||
"allow_nil?": true, | ||
"primary_key?": false, | ||
"generated?": false | ||
}, | ||
{ | ||
"default": "nil", | ||
"size": null, | ||
"type": "map", | ||
"source": "profile", | ||
"references": null, | ||
"allow_nil?": true, | ||
"primary_key?": false, | ||
"generated?": false | ||
}, | ||
{ | ||
"default": "nil", | ||
"size": null, | ||
"type": [ | ||
"array", | ||
"map" | ||
], | ||
"source": "alternate_profiles", | ||
"references": null, | ||
"allow_nil?": true, | ||
"primary_key?": false, | ||
"generated?": false | ||
}, | ||
{ | ||
"default": "nil", | ||
"size": null, | ||
"type": "text", | ||
"source": "type", | ||
"references": null, | ||
"allow_nil?": true, | ||
"primary_key?": false, | ||
"generated?": false | ||
}, | ||
{ | ||
"default": "nil", | ||
"size": null, | ||
"type": [ | ||
"array", | ||
"text" | ||
], | ||
"source": "tags", | ||
"references": null, | ||
"allow_nil?": true, | ||
"primary_key?": false, | ||
"generated?": false | ||
}, | ||
{ | ||
"default": "fragment(\"now()\")", | ||
"size": null, | ||
"type": "utc_datetime_usec", | ||
"source": "inserted_at", | ||
"references": null, | ||
"allow_nil?": false, | ||
"primary_key?": false, | ||
"generated?": false | ||
}, | ||
{ | ||
"default": "fragment(\"now()\")", | ||
"size": null, | ||
"type": "utc_datetime_usec", | ||
"source": "updated_at", | ||
"references": null, | ||
"allow_nil?": false, | ||
"primary_key?": false, | ||
"generated?": false | ||
} | ||
], | ||
"table": "users", | ||
"hash": "ABBC7E1B2B4BC0B24C2CBF2C08AFA65AD4A8F2D3FA6659DA9E5B7A5413CA421B", | ||
"repo": "Elixir.Demo.Repo", | ||
"multitenancy": { | ||
"global": true, | ||
"attribute": "id", | ||
"strategy": "attribute" | ||
}, | ||
"schema": null, | ||
"check_constraints": [], | ||
"identities": [ | ||
{ | ||
"name": "representative_name", | ||
"keys": [ | ||
"first_name", | ||
"last_name" | ||
], | ||
"base_filter": "representative = true", | ||
"index_name": "users_representative_name_index" | ||
} | ||
], | ||
"custom_indexes": [], | ||
"base_filter": null, | ||
"custom_statements": [], | ||
"has_create_action": true | ||
} |
Oops, something went wrong.