diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-08-14 20:24:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-14 20:24:47 +0200 |
commit | 464daffdf9a37e9a773d224a162fad022890d463 (patch) | |
tree | 3aef15aed6260a6a70606e49ed3b34e22fc673db /db/migrate | |
parent | be13e95d066bcef058abb88790d5cdff74f57a21 (diff) |
Upgrade Doorkeeper to 4.4.1 (#8197)
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20171201000000_change_account_id_nonnullable_in_lists.rb | 2 | ||||
-rw-r--r-- | db/migrate/20180814171349_add_confidential_to_doorkeeper_application.rb | 23 |
2 files changed, 23 insertions, 2 deletions
diff --git a/db/migrate/20171201000000_change_account_id_nonnullable_in_lists.rb b/db/migrate/20171201000000_change_account_id_nonnullable_in_lists.rb index 120f74402..3369e3b9e 100644 --- a/db/migrate/20171201000000_change_account_id_nonnullable_in_lists.rb +++ b/db/migrate/20171201000000_change_account_id_nonnullable_in_lists.rb @@ -1,5 +1,3 @@ -require Rails.root.join('lib', 'mastodon', 'migration_helpers') - class ChangeAccountIdNonnullableInLists < ActiveRecord::Migration[5.1] def change change_column_null :lists, :account_id, false diff --git a/db/migrate/20180814171349_add_confidential_to_doorkeeper_application.rb b/db/migrate/20180814171349_add_confidential_to_doorkeeper_application.rb new file mode 100644 index 000000000..7077a4e65 --- /dev/null +++ b/db/migrate/20180814171349_add_confidential_to_doorkeeper_application.rb @@ -0,0 +1,23 @@ +require Rails.root.join('lib', 'mastodon', 'migration_helpers') + +class AddConfidentialToDoorkeeperApplication < ActiveRecord::Migration[5.2] + include Mastodon::MigrationHelpers + + disable_ddl_transaction! + + def up + safety_assured do + add_column_with_default( + :oauth_applications, + :confidential, + :boolean, + allow_null: false, + default: true # maintaining backwards compatibility: require secrets + ) + end + end + + def down + remove_column :oauth_applications, :confidential + end +end |