diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-07-21 20:50:30 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-07-21 20:50:30 -0500 |
commit | 084b9504017e519e33007f7aa8cdff7d571f954a (patch) | |
tree | bcefc968d1b5ae0ba40bac9adb2eb8955c3b6a21 /db | |
parent | bca5a3073f3f6bee2c64f3e199e9e56d0dd7ff7e (diff) |
split `hide public profile` & `hide public ap outbox` into separate user options, make original `Account.hidden` prop federation-affecting `invisible mode`
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20190722014444_migrate_hidden_to_hide_profile.rb | 10 | ||||
-rw-r--r-- | db/schema.rb | 4 |
2 files changed, 13 insertions, 1 deletions
diff --git a/db/migrate/20190722014444_migrate_hidden_to_hide_profile.rb b/db/migrate/20190722014444_migrate_hidden_to_hide_profile.rb new file mode 100644 index 000000000..c4d305e6b --- /dev/null +++ b/db/migrate/20190722014444_migrate_hidden_to_hide_profile.rb @@ -0,0 +1,10 @@ +class MigrateHiddenToHideProfile < ActiveRecord::Migration[5.2] + disable_ddl_transaction! + def up + Account.local.find_each do |account| + next unless account&.user + account.user.settings.hide_public_profile = account.hidden || false + account.hidden = false + end + end +end diff --git a/db/schema.rb b/db/schema.rb index fccde6264..2238213a4 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_07_19_212820) do +ActiveRecord::Schema.define(version: 2019_07_22_014444) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -667,6 +667,7 @@ ActiveRecord::Schema.define(version: 2019_07_19_212820) do t.boolean "edited" t.boolean "imported" t.string "origin" + t.tsvector "tsv" t.index ["account_id", "id", "visibility", "updated_at"], name: "index_statuses_20180106", order: { id: :desc } t.index ["account_id", "id", "visibility"], name: "index_statuses_on_account_id_and_id_and_visibility", where: "(visibility = ANY (ARRAY[0, 1, 2, 4, 5]))" t.index ["in_reply_to_account_id"], name: "index_statuses_on_in_reply_to_account_id" @@ -674,6 +675,7 @@ ActiveRecord::Schema.define(version: 2019_07_19_212820) do t.index ["network"], name: "index_statuses_on_network", where: "network" t.index ["origin"], name: "index_statuses_on_origin", unique: true t.index ["reblog_of_id", "account_id"], name: "index_statuses_on_reblog_of_id_and_account_id" + t.index ["tsv"], name: "tsv_idx", using: :gin t.index ["uri"], name: "index_statuses_on_uri", unique: true end |