diff options
| author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-02-26 15:29:43 +0300 |
|---|---|---|
| committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-02-26 15:29:43 +0300 |
| commit | fd46edb473441fcf75492da4fcd30836d3382a0f (patch) | |
| tree | e8ea89d49178721f11b7f81cfae341393fba067b /priv/repo/migrations/20190222104808_data_migration_normalize_scopes.exs | |
| parent | e82b70eb530293c3dfe8597c4100320fba96e479 (diff) | |
| parent | 03afee3fd11116d7deef256bd2b0de22526ff5b5 (diff) | |
| download | pleroma-fd46edb473441fcf75492da4fcd30836d3382a0f.tar.gz pleroma-fd46edb473441fcf75492da4fcd30836d3382a0f.zip | |
Merge remote-tracking branch 'remotes/origin/develop' into customizable_auth
Diffstat (limited to 'priv/repo/migrations/20190222104808_data_migration_normalize_scopes.exs')
| -rw-r--r-- | priv/repo/migrations/20190222104808_data_migration_normalize_scopes.exs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/priv/repo/migrations/20190222104808_data_migration_normalize_scopes.exs b/priv/repo/migrations/20190222104808_data_migration_normalize_scopes.exs new file mode 100644 index 000000000..d44e5096b --- /dev/null +++ b/priv/repo/migrations/20190222104808_data_migration_normalize_scopes.exs @@ -0,0 +1,11 @@ +defmodule Pleroma.Repo.Migrations.DataMigrationNormalizeScopes do + use Ecto.Migration + + def up do + for t <- [:apps, :oauth_authorizations, :oauth_tokens] do + execute "UPDATE #{t} SET scopes = string_to_array(array_to_string(scopes, ' '), ' ');" + end + end + + def down, do: :noop +end |
