about summary refs log tree commit diff
path: root/db/migrate
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2020-03-22 16:10:44 +0100
committerThibaut Girka <thib@sitedethib.com>2020-03-22 16:10:44 +0100
commit9abb227250bd2b377d96626122d431ba30c5f5e0 (patch)
treec3072e0098155cbb7b6f86830cfd0b174703f23e /db/migrate
parent7115b0b8c99b7e88aee264be75945e592dec33e4 (diff)
parentcd6d851d83c38c4f160ae939e08a913bd98fbd8f (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- `README.md`:
  Our README.md files are completely different. Discarded upstream changes.
- `app/javascript/core/admin.js`:
  Updating rails-ujs, no real conflict, but a comment to close to changed
  code. Various glitch-soc-only files have been updated to match those changes,
  though.
- `package.json`:
  No real conflict, just an additional dependency in glitch-soc that was too
  close to something updated upstream. Took upstream's changes.
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20191212163405_add_hide_collections_to_accounts.rb5
-rw-r--r--db/migrate/20200306035625_add_processing_to_media_attachments.rb5
-rw-r--r--db/migrate/20200312144258_add_title_to_account_warning_presets.rb15
-rw-r--r--db/migrate/20200312185443_add_parent_id_to_email_domain_blocks.rb5
4 files changed, 30 insertions, 0 deletions
diff --git a/db/migrate/20191212163405_add_hide_collections_to_accounts.rb b/db/migrate/20191212163405_add_hide_collections_to_accounts.rb
new file mode 100644
index 000000000..fa99b32e5
--- /dev/null
+++ b/db/migrate/20191212163405_add_hide_collections_to_accounts.rb
@@ -0,0 +1,5 @@
+class AddHideCollectionsToAccounts < ActiveRecord::Migration[5.2]
+  def change
+    add_column :accounts, :hide_collections, :boolean
+  end
+end
diff --git a/db/migrate/20200306035625_add_processing_to_media_attachments.rb b/db/migrate/20200306035625_add_processing_to_media_attachments.rb
new file mode 100644
index 000000000..131ffa52a
--- /dev/null
+++ b/db/migrate/20200306035625_add_processing_to_media_attachments.rb
@@ -0,0 +1,5 @@
+class AddProcessingToMediaAttachments < ActiveRecord::Migration[5.2]
+  def change
+    add_column :media_attachments, :processing, :integer
+  end
+end
diff --git a/db/migrate/20200312144258_add_title_to_account_warning_presets.rb b/db/migrate/20200312144258_add_title_to_account_warning_presets.rb
new file mode 100644
index 000000000..46a5350e7
--- /dev/null
+++ b/db/migrate/20200312144258_add_title_to_account_warning_presets.rb
@@ -0,0 +1,15 @@
+require Rails.root.join('lib', 'mastodon', 'migration_helpers')
+
+class AddTitleToAccountWarningPresets < ActiveRecord::Migration[5.2]
+  include Mastodon::MigrationHelpers
+
+  disable_ddl_transaction!
+
+  def up
+    safety_assured { add_column_with_default :account_warning_presets, :title, :string, default: '', allow_null: false }
+  end
+
+  def down
+    remove_column :account_warning_presets, :title
+  end
+end
diff --git a/db/migrate/20200312185443_add_parent_id_to_email_domain_blocks.rb b/db/migrate/20200312185443_add_parent_id_to_email_domain_blocks.rb
new file mode 100644
index 000000000..03915040c
--- /dev/null
+++ b/db/migrate/20200312185443_add_parent_id_to_email_domain_blocks.rb
@@ -0,0 +1,5 @@
+class AddParentIdToEmailDomainBlocks < ActiveRecord::Migration[5.2]
+  def change
+    add_reference :email_domain_blocks, :parent, null: true, default: nil, foreign_key: { on_delete: :cascade, to_table: :email_domain_blocks }, index: false
+  end
+end