Merge branch 'main' into glitch-soc/merge-upstream

Conflicts:
- `db/schema.rb`:
  Conflict due to glitch-soc adding the `content_type` column on status edits
  and thus having a different schema version number.
  Solved by taking upstream's schema version number, as it is higher than
  glitch-soc's.
This commit is contained in:
Claire
2022-02-17 10:58:25 +01:00
81 changed files with 1461 additions and 381 deletions

View File

@ -0,0 +1,14 @@
class CreateAppeals < ActiveRecord::Migration[6.1]
def change
create_table :appeals do |t|
t.belongs_to :account, null: false, foreign_key: { on_delete: :cascade }
t.belongs_to :account_warning, null: false, foreign_key: { on_delete: :cascade }, index: { unique: true }
t.text :text, null: false, default: ''
t.datetime :approved_at
t.belongs_to :approved_by_account, foreign_key: { to_table: :accounts, on_delete: :nullify }
t.datetime :rejected_at
t.belongs_to :rejected_by_account, foreign_key: { to_table: :accounts, on_delete: :nullify }
t.timestamps
end
end
end

View File

@ -0,0 +1,5 @@
class AddOverruledAtToAccountWarnings < ActiveRecord::Migration[6.1]
def change
add_column :account_warnings, :overruled_at, :datetime
end
end