about summary refs log tree commit diff
path: root/db
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-10-03 11:10:12 +0200
committerThibaut Girka <thib@sitedethib.com>2019-10-03 11:10:12 +0200
commita84aedb7a7f050cbf5293351723f55a904992b3a (patch)
tree769d397390665bcddf9b44fc1ad4418b2757c5f1 /db
parent857c67f31b23b9c496e07eda41755ba449a37f17 (diff)
parentbae268b2f6501ccb0ceeb8dd36180698839c4d3c (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- app/models/media_attachment.rb
  Upstream raised max image size from 8MB to 10MB while our limit is
  configurable. Raised the default to 10MB.
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20191001213028_add_lock_version_to_account_stats.rb15
-rw-r--r--db/schema.rb3
2 files changed, 17 insertions, 1 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
diff --git a/db/schema.rb b/db/schema.rb
index 6e2f6a2e7..d9c4f7a37 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
 #
 # It's strongly recommended that you check this file into your version control system.
 
-ActiveRecord::Schema.define(version: 2019_09_27_232842) do
+ActiveRecord::Schema.define(version: 2019_10_01_213028) do
 
   # These are extensions that must be enabled in order to support this database
   enable_extension "plpgsql"
@@ -97,6 +97,7 @@ ActiveRecord::Schema.define(version: 2019_09_27_232842) do
     t.datetime "created_at", null: false
     t.datetime "updated_at", null: false
     t.datetime "last_status_at"
+    t.integer "lock_version", default: 0, null: false
     t.index ["account_id"], name: "index_account_stats_on_account_id", unique: true
   end