diff options
| author | lambda <pleromagit@rogerbraun.net> | 2019-02-20 16:15:45 +0000 |
|---|---|---|
| committer | lambda <pleromagit@rogerbraun.net> | 2019-02-20 16:15:45 +0000 |
| commit | dff5e1e46ab5e622ae0cc4b4422ae57ce0a0d5de (patch) | |
| tree | 3e71afab323f4677b142ed6e9f45e6ecab226b1e /priv/repo/migrations/20190213185600_data_migration_populate_o_auth_scopes.exs | |
| parent | 11b3c10c54254ecad4b52f27856b8d95629e541c (diff) | |
| parent | b574d97c2ee5ea926342b6ef00d9c22c1cc7ebdd (diff) | |
| download | pleroma-dff5e1e46ab5e622ae0cc4b4422ae57ce0a0d5de.tar.gz pleroma-dff5e1e46ab5e622ae0cc4b4422ae57ce0a0d5de.zip | |
Merge branch '468_oauth2_scopes' into 'develop'
[#468] OAuth2 scopes
Closes #468
See merge request pleroma/pleroma!799
Diffstat (limited to 'priv/repo/migrations/20190213185600_data_migration_populate_o_auth_scopes.exs')
| -rw-r--r-- | priv/repo/migrations/20190213185600_data_migration_populate_o_auth_scopes.exs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/priv/repo/migrations/20190213185600_data_migration_populate_o_auth_scopes.exs b/priv/repo/migrations/20190213185600_data_migration_populate_o_auth_scopes.exs new file mode 100644 index 000000000..7afbcbd76 --- /dev/null +++ b/priv/repo/migrations/20190213185600_data_migration_populate_o_auth_scopes.exs @@ -0,0 +1,11 @@ +defmodule Pleroma.Repo.Migrations.DataMigrationPopulateOAuthScopes do + use Ecto.Migration + + def up do + for t <- [:oauth_authorizations, :oauth_tokens] do + execute "UPDATE #{t} SET scopes = apps.scopes FROM apps WHERE #{t}.app_id = apps.id;" + end + end + + def down, do: :noop +end |
