-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add some sensitive fields to the demo app for testing
- Loading branch information
1 parent
2762e2c
commit 652611d
Showing
3 changed files
with
188 additions
and
1 deletion.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
dev/repo/migrations/20231121063220_add_private_and_sensitive_fields.exs
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.AddPrivateAndSensitiveFields 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 :api_key, :text | ||
add :date_of_birth, :date | ||
end | ||
end | ||
|
||
def down do | ||
alter table(:users) do | ||
remove :date_of_birth | ||
remove :api_key | ||
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,155 @@ | ||
{ | ||
"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": [ | ||
"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": "338E5E3B2C34F4001BC0330CAF13D840CBD2B828DFD4CF8FC76FBA53AEFA03D1", | ||
"repo": "Elixir.Demo.Repo", | ||
"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": [], | ||
"multitenancy": { | ||
"global": null, | ||
"attribute": null, | ||
"strategy": null | ||
}, | ||
"base_filter": null, | ||
"custom_statements": [], | ||
"has_create_action": true | ||
} |
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