diff options
author | ThibG <thib@sitedethib.com> | 2019-10-05 18:04:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-05 18:04:36 +0200 |
commit | 3921125e5578fb3871fdcae0e8e8a77179f1ad72 (patch) | |
tree | 997c8ed2e7a6b8152266edc0c37ea8264c59d1ab /db | |
parent | 857c67f31b23b9c496e07eda41755ba449a37f17 (diff) | |
parent | bc8543d9af0045fe2175f7e2234da9c77dc55023 (diff) |
Merge pull request #1228 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20191001213028_add_lock_version_to_account_stats.rb | 15 | ||||
-rw-r--r-- | db/schema.rb | 3 |
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 |