about summary refs log tree commit diff
path: root/db/migrate
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-10-05 18:04:36 +0200
committerGitHub <noreply@github.com>2019-10-05 18:04:36 +0200
commit3921125e5578fb3871fdcae0e8e8a77179f1ad72 (patch)
tree997c8ed2e7a6b8152266edc0c37ea8264c59d1ab /db/migrate
parent857c67f31b23b9c496e07eda41755ba449a37f17 (diff)
parentbc8543d9af0045fe2175f7e2234da9c77dc55023 (diff)
Merge pull request #1228 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20191001213028_add_lock_version_to_account_stats.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20191001213028_add_lock_version_to_account_stats.rb b/db/migrate/20191001213028_add_lock_version_to_account_stats.rb
new file mode 100644
index 000000000..47f37cca2
--- /dev/null
+++ b/db/migrate/20191001213028_add_lock_version_to_account_stats.rb
@@ -0,0 +1,15 @@
+require Rails.root.join('lib', 'mastodon', 'migration_helpers')
+
+class AddLockVersionToAccountStats < ActiveRecord::Migration[5.2]
+  include Mastodon::MigrationHelpers
+
+  disable_ddl_transaction!
+
+  def up
+    safety_assured { add_column_with_default :account_stats, :lock_version, :integer, allow_null: false, default: 0 }
+  end
+
+  def down
+    remove_column :account_stats, :lock_version
+  end
+end