diff options
author | Thibaut Girka <thib@sitedethib.com> | 2018-08-10 15:39:06 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2018-08-10 16:22:31 +0200 |
commit | e5a603206dfa76e2cd1b8a7fbb940fbd844b436c (patch) | |
tree | c3271f86b91ce2d13aea4f111dad6da4d07dcc04 /db | |
parent | 90b492143dae5cbaf884b12fbfd823c9f65d392f (diff) | |
parent | 5b8603879f06573d51c5c33edda6f410d1af7a02 (diff) |
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: app/controllers/accounts_controller.rb app/javascript/mastodon/locales/pl.json app/views/about/more.html.haml Conflicts in `accounts_controller.rb` resolved by taking upstream's version + our `use_pack`. Conflicts in `pl.json` resolved by taking upstream's changes. Conflicts in `aboute/more.html.haml` resolved by taking upstream's changes.
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20180808175627_create_account_pins.rb | 12 | ||||
-rw-r--r-- | db/schema.rb | 16 |
2 files changed, 26 insertions, 2 deletions
diff --git a/db/migrate/20180808175627_create_account_pins.rb b/db/migrate/20180808175627_create_account_pins.rb new file mode 100644 index 000000000..43d8185be --- /dev/null +++ b/db/migrate/20180808175627_create_account_pins.rb @@ -0,0 +1,12 @@ +class CreateAccountPins < ActiveRecord::Migration[5.2] + def change + create_table :account_pins do |t| + t.belongs_to :account, foreign_key: { on_delete: :cascade } + t.belongs_to :target_account, foreign_key: { on_delete: :cascade, to_table: :accounts } + + t.timestamps + end + + add_index :account_pins, [:account_id, :target_account_id], unique: true + end +end diff --git a/db/schema.rb b/db/schema.rb index 3034b9bd6..92b6f93cf 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: 2018_07_11_152640) do +ActiveRecord::Schema.define(version: 2018_08_08_175627) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -33,6 +33,16 @@ ActiveRecord::Schema.define(version: 2018_07_11_152640) do t.index ["target_account_id"], name: "index_account_moderation_notes_on_target_account_id" end + create_table "account_pins", force: :cascade do |t| + t.bigint "account_id" + t.bigint "target_account_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["account_id", "target_account_id"], name: "index_account_pins_on_account_id_and_target_account_id", unique: true + t.index ["account_id"], name: "index_account_pins_on_account_id" + t.index ["target_account_id"], name: "index_account_pins_on_target_account_id" + end + create_table "accounts", force: :cascade do |t| t.string "username", default: "", null: false t.string "domain" @@ -159,9 +169,9 @@ ActiveRecord::Schema.define(version: 2018_07_11_152640) do t.text "phrase", default: "", null: false t.string "context", default: [], null: false, array: true t.boolean "irreversible", default: false, null: false - t.boolean "whole_word", default: true, null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.boolean "whole_word", default: true, null: false t.index ["account_id"], name: "index_custom_filters_on_account_id" end @@ -586,6 +596,8 @@ ActiveRecord::Schema.define(version: 2018_07_11_152640) do add_foreign_key "account_domain_blocks", "accounts", name: "fk_206c6029bd", on_delete: :cascade add_foreign_key "account_moderation_notes", "accounts" add_foreign_key "account_moderation_notes", "accounts", column: "target_account_id" + add_foreign_key "account_pins", "accounts", column: "target_account_id", on_delete: :cascade + add_foreign_key "account_pins", "accounts", on_delete: :cascade add_foreign_key "accounts", "accounts", column: "moved_to_account_id", on_delete: :nullify add_foreign_key "admin_action_logs", "accounts", on_delete: :cascade add_foreign_key "backups", "users", on_delete: :nullify |