Merge tag 'v3.2.0' into hometown-dev
This commit is contained in:
@ -1,13 +0,0 @@
|
||||
class CreateDevices < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :devices do |t|
|
||||
t.integer :account_id, null: false
|
||||
t.string :registration_id, null: false, default: ''
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :devices, :registration_id
|
||||
add_index :devices, :account_id
|
||||
end
|
||||
end
|
@ -1,5 +1,5 @@
|
||||
class RemoveDevices < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
drop_table :devices
|
||||
drop_table :devices if table_exists?(:devices)
|
||||
end
|
||||
end
|
||||
|
@ -0,0 +1,22 @@
|
||||
class RemoveDuplicatedIndexesPghero < ActiveRecord::Migration[5.2]
|
||||
def up
|
||||
remove_index :account_conversations, name: :index_account_conversations_on_account_id if index_exists?(:account_conversations, :account_id, name: :index_account_conversations_on_account_id)
|
||||
remove_index :account_identity_proofs, name: :index_account_identity_proofs_on_account_id if index_exists?(:account_identity_proofs, :account_id, name: :index_account_identity_proofs_on_account_id)
|
||||
remove_index :account_pins, name: :index_account_pins_on_account_id if index_exists?(:account_pins, :account_id, name: :index_account_pins_on_account_id)
|
||||
remove_index :announcement_mutes, name: :index_announcement_mutes_on_account_id if index_exists?(:announcement_mutes, :account_id, name: :index_announcement_mutes_on_account_id)
|
||||
remove_index :announcement_reactions, name: :index_announcement_reactions_on_account_id if index_exists?(:announcement_reactions, :account_id, name: :index_announcement_reactions_on_account_id)
|
||||
remove_index :bookmarks, name: :index_bookmarks_on_account_id if index_exists?(:bookmarks, :account_id, name: :index_bookmarks_on_account_id)
|
||||
remove_index :markers, name: :index_markers_on_user_id if index_exists?(:markers, :user_id, name: :index_markers_on_user_id)
|
||||
end
|
||||
|
||||
def down
|
||||
add_index :account_conversations, :account_id, name: :index_account_conversations_on_account_id unless index_exists?(:account_conversations, :account_id, name: :index_account_conversations_on_account_id)
|
||||
add_index :account_identity_proofs, :account_id, name: :index_account_identity_proofs_on_account_id unless index_exists?(:account_identity_proofs, :account_id, name: :index_account_identity_proofs_on_account_id)
|
||||
add_index :account_pins, :account_id, name: :index_account_pins_on_account_id unless index_exists?(:account_pins, :account_id, name: :index_account_pins_on_account_id)
|
||||
add_index :announcement_mutes, :account_id, name: :index_announcement_mutes_on_account_id unless index_exists?(:announcement_mutes, :account_id, name: :index_announcement_mutes_on_account_id)
|
||||
add_index :announcement_reactions, :account_id, name: :index_announcement_reactions_on_account_id unless index_exists?(:announcement_reactions, :account_id, name: :index_announcement_reactions_on_account_id)
|
||||
add_index :bookmarks, :account_id, name: :index_bookmarks_on_account_id unless index_exists?(:bookmarks, :account_id, name: :index_bookmarks_on_account_id)
|
||||
add_index :markers, :user_id, name: :index_markers_on_user_id unless index_exists?(:markers, :user_id, name: :index_markers_on_user_id)
|
||||
end
|
||||
end
|
||||
|
14
db/migrate/20200516180352_create_devices.rb
Normal file
14
db/migrate/20200516180352_create_devices.rb
Normal file
@ -0,0 +1,14 @@
|
||||
class CreateDevices < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :devices do |t|
|
||||
t.references :access_token, foreign_key: { to_table: :oauth_access_tokens, on_delete: :cascade, index: :unique }
|
||||
t.references :account, foreign_key: { on_delete: :cascade }
|
||||
t.string :device_id, default: '', null: false
|
||||
t.string :name, default: '', null: false
|
||||
t.text :fingerprint_key, default: '', null: false
|
||||
t.text :identity_key, default: '', null: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
12
db/migrate/20200516183822_create_one_time_keys.rb
Normal file
12
db/migrate/20200516183822_create_one_time_keys.rb
Normal file
@ -0,0 +1,12 @@
|
||||
class CreateOneTimeKeys < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :one_time_keys do |t|
|
||||
t.references :device, foreign_key: { on_delete: :cascade }
|
||||
t.string :key_id, default: '', null: false, index: :unique
|
||||
t.text :key, default: '', null: false
|
||||
t.text :signature, default: '', null: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
15
db/migrate/20200518083523_create_encrypted_messages.rb
Normal file
15
db/migrate/20200518083523_create_encrypted_messages.rb
Normal file
@ -0,0 +1,15 @@
|
||||
class CreateEncryptedMessages < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :encrypted_messages do |t|
|
||||
t.references :device, foreign_key: { on_delete: :cascade }
|
||||
t.references :from_account, foreign_key: { to_table: :accounts, on_delete: :cascade }
|
||||
t.string :from_device_id, default: '', null: false
|
||||
t.integer :type, default: 0, null: false
|
||||
t.text :body, default: '', null: false
|
||||
t.text :digest, default: '', null: false
|
||||
t.text :message_franking, default: '', null: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,13 @@
|
||||
class EncryptedMessageIdsToTimestampIds < ActiveRecord::Migration[5.2]
|
||||
def up
|
||||
safety_assured do
|
||||
execute("ALTER TABLE encrypted_messages ALTER COLUMN id SET DEFAULT timestamp_id('encrypted_messages')")
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
execute("LOCK encrypted_messages")
|
||||
execute("SELECT setval('encrypted_messages_id_seq', (SELECT MAX(id) FROM encrypted_messages))")
|
||||
execute("ALTER TABLE encrypted_messages ALTER COLUMN id SET DEFAULT nextval('encrypted_messages_id_seq')")
|
||||
end
|
||||
end
|
5
db/migrate/20200529214050_add_devices_url_to_accounts.rb
Normal file
5
db/migrate/20200529214050_add_devices_url_to_accounts.rb
Normal file
@ -0,0 +1,5 @@
|
||||
class AddDevicesUrlToAccounts < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :accounts, :devices_url, :string
|
||||
end
|
||||
end
|
9
db/migrate/20200601222558_create_system_keys.rb
Normal file
9
db/migrate/20200601222558_create_system_keys.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class CreateSystemKeys < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :system_keys do |t|
|
||||
t.binary :key
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,5 @@
|
||||
class AddBlurhashToPreviewCards < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :preview_cards, :blurhash, :string
|
||||
end
|
||||
end
|
6
db/migrate/20200608113046_add_sign_in_token_to_users.rb
Normal file
6
db/migrate/20200608113046_add_sign_in_token_to_users.rb
Normal file
@ -0,0 +1,6 @@
|
||||
class AddSignInTokenToUsers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :users, :sign_in_token, :string
|
||||
add_column :users, :sign_in_token_sent_at, :datetime
|
||||
end
|
||||
end
|
@ -0,0 +1,15 @@
|
||||
class AddFixedLowercaseIndexToAccounts < ActiveRecord::Migration[5.2]
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
rename_index :accounts, 'index_accounts_on_username_and_domain_lower', 'old_index_accounts_on_username_and_domain_lower' unless index_name_exists?(:accounts, 'old_index_accounts_on_username_and_domain_lower')
|
||||
add_index :accounts, "lower (username), COALESCE(lower(domain), '')", name: 'index_accounts_on_username_and_domain_lower', unique: true, algorithm: :concurrently
|
||||
remove_index :accounts, name: 'old_index_accounts_on_username_and_domain_lower'
|
||||
end
|
||||
|
||||
def down
|
||||
add_index :accounts, 'lower (username), lower(domain)', name: 'old_index_accounts_on_username_and_domain_lower', unique: true, algorithm: :concurrently
|
||||
remove_index :accounts, name: 'index_accounts_on_username_and_domain_lower'
|
||||
rename_index :accounts, 'old_index_accounts_on_username_and_domain_lower', 'index_accounts_on_username_and_domain_lower'
|
||||
end
|
||||
end
|
@ -0,0 +1,17 @@
|
||||
class MediaAttachmentIdsToTimestampIds < ActiveRecord::Migration[5.1]
|
||||
def up
|
||||
# Set up the media_attachments.id column to use our timestamp-based IDs.
|
||||
safety_assured do
|
||||
execute("ALTER TABLE media_attachments ALTER COLUMN id SET DEFAULT timestamp_id('media_attachments')")
|
||||
end
|
||||
|
||||
# Make sure we have a sequence to use.
|
||||
Mastodon::Snowflake.ensure_id_sequences_exist
|
||||
end
|
||||
|
||||
def down
|
||||
execute("LOCK media_attachments")
|
||||
execute("SELECT setval('media_attachments_id_seq', (SELECT MAX(id) FROM media_attachments))")
|
||||
execute("ALTER TABLE media_attachments ALTER COLUMN id SET DEFAULT nextval('media_attachments_id_seq')")
|
||||
end
|
||||
end
|
@ -0,0 +1,11 @@
|
||||
class AddThumbnailColumnsToMediaAttachments < ActiveRecord::Migration[5.2]
|
||||
def up
|
||||
add_attachment :media_attachments, :thumbnail
|
||||
add_column :media_attachments, :thumbnail_remote_url, :string
|
||||
end
|
||||
|
||||
def down
|
||||
remove_attachment :media_attachments, :thumbnail
|
||||
remove_column :media_attachments, :thumbnail_remote_url
|
||||
end
|
||||
end
|
13
db/migrate/20200628133322_create_account_notes.rb
Normal file
13
db/migrate/20200628133322_create_account_notes.rb
Normal file
@ -0,0 +1,13 @@
|
||||
class CreateAccountNotes < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :account_notes do |t|
|
||||
t.references :account, foreign_key: { on_delete: :cascade }, index: false
|
||||
t.references :target_account, foreign_key: { to_table: :accounts, on_delete: :cascade }
|
||||
t.text :comment, null: false
|
||||
t.index [:account_id, :target_account_id], unique: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
|
83
db/schema.rb
83
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: 2020_05_10_110808) do
|
||||
ActiveRecord::Schema.define(version: 2020_06_28_133322) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
@ -33,7 +33,6 @@ ActiveRecord::Schema.define(version: 2020_05_10_110808) do
|
||||
t.integer "lock_version", default: 0, null: false
|
||||
t.boolean "unread", default: false, null: false
|
||||
t.index ["account_id", "conversation_id", "participant_account_ids"], name: "index_unique_conversations", unique: true
|
||||
t.index ["account_id"], name: "index_account_conversations_on_account_id"
|
||||
t.index ["conversation_id"], name: "index_account_conversations_on_conversation_id"
|
||||
end
|
||||
|
||||
@ -55,7 +54,6 @@ ActiveRecord::Schema.define(version: 2020_05_10_110808) do
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["account_id", "provider", "provider_username"], name: "index_account_proofs_on_account_and_provider_and_username", unique: true
|
||||
t.index ["account_id"], name: "index_account_identity_proofs_on_account_id"
|
||||
end
|
||||
|
||||
create_table "account_migrations", force: :cascade do |t|
|
||||
@ -79,13 +77,22 @@ ActiveRecord::Schema.define(version: 2020_05_10_110808) do
|
||||
t.index ["target_account_id"], name: "index_account_moderation_notes_on_target_account_id"
|
||||
end
|
||||
|
||||
create_table "account_notes", force: :cascade do |t|
|
||||
t.bigint "account_id"
|
||||
t.bigint "target_account_id"
|
||||
t.text "comment", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["account_id", "target_account_id"], name: "index_account_notes_on_account_id_and_target_account_id", unique: true
|
||||
t.index ["target_account_id"], name: "index_account_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
|
||||
|
||||
@ -174,8 +181,9 @@ ActiveRecord::Schema.define(version: 2020_05_10_110808) do
|
||||
t.boolean "hide_collections"
|
||||
t.integer "avatar_storage_schema_version"
|
||||
t.integer "header_storage_schema_version"
|
||||
t.string "devices_url"
|
||||
t.index "(((setweight(to_tsvector('simple'::regconfig, (display_name)::text), 'A'::\"char\") || setweight(to_tsvector('simple'::regconfig, (username)::text), 'B'::\"char\")) || setweight(to_tsvector('simple'::regconfig, (COALESCE(domain, ''::character varying))::text), 'C'::\"char\")))", name: "search_index", using: :gin
|
||||
t.index "lower((username)::text), lower((domain)::text)", name: "index_accounts_on_username_and_domain_lower", unique: true
|
||||
t.index "lower((username)::text), COALESCE(lower((domain)::text), ''::text)", name: "index_accounts_on_username_and_domain_lower", unique: true
|
||||
t.index ["moved_to_account_id"], name: "index_accounts_on_moved_to_account_id"
|
||||
t.index ["uri"], name: "index_accounts_on_uri"
|
||||
t.index ["url"], name: "index_accounts_on_url"
|
||||
@ -206,7 +214,6 @@ ActiveRecord::Schema.define(version: 2020_05_10_110808) do
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["account_id", "announcement_id"], name: "index_announcement_mutes_on_account_id_and_announcement_id", unique: true
|
||||
t.index ["account_id"], name: "index_announcement_mutes_on_account_id"
|
||||
t.index ["announcement_id"], name: "index_announcement_mutes_on_announcement_id"
|
||||
end
|
||||
|
||||
@ -218,7 +225,6 @@ ActiveRecord::Schema.define(version: 2020_05_10_110808) do
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["account_id", "announcement_id", "name"], name: "index_announcement_reactions_on_account_id_and_announcement_id", unique: true
|
||||
t.index ["account_id"], name: "index_announcement_reactions_on_account_id"
|
||||
t.index ["announcement_id"], name: "index_announcement_reactions_on_announcement_id"
|
||||
t.index ["custom_emoji_id"], name: "index_announcement_reactions_on_custom_emoji_id"
|
||||
end
|
||||
@ -263,7 +269,6 @@ ActiveRecord::Schema.define(version: 2020_05_10_110808) do
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["account_id", "status_id"], name: "index_bookmarks_on_account_id_and_status_id", unique: true
|
||||
t.index ["account_id"], name: "index_bookmarks_on_account_id"
|
||||
t.index ["status_id"], name: "index_bookmarks_on_status_id"
|
||||
end
|
||||
|
||||
@ -317,6 +322,19 @@ ActiveRecord::Schema.define(version: 2020_05_10_110808) do
|
||||
t.index ["account_id"], name: "index_custom_filters_on_account_id"
|
||||
end
|
||||
|
||||
create_table "devices", force: :cascade do |t|
|
||||
t.bigint "access_token_id"
|
||||
t.bigint "account_id"
|
||||
t.string "device_id", default: "", null: false
|
||||
t.string "name", default: "", null: false
|
||||
t.text "fingerprint_key", default: "", null: false
|
||||
t.text "identity_key", default: "", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["access_token_id"], name: "index_devices_on_access_token_id"
|
||||
t.index ["account_id"], name: "index_devices_on_account_id"
|
||||
end
|
||||
|
||||
create_table "domain_allows", force: :cascade do |t|
|
||||
t.string "domain", default: "", null: false
|
||||
t.datetime "created_at", null: false
|
||||
@ -344,6 +362,20 @@ ActiveRecord::Schema.define(version: 2020_05_10_110808) do
|
||||
t.index ["domain"], name: "index_email_domain_blocks_on_domain", unique: true
|
||||
end
|
||||
|
||||
create_table "encrypted_messages", id: :bigint, default: -> { "timestamp_id('encrypted_messages'::text)" }, force: :cascade do |t|
|
||||
t.bigint "device_id"
|
||||
t.bigint "from_account_id"
|
||||
t.string "from_device_id", default: "", null: false
|
||||
t.integer "type", default: 0, null: false
|
||||
t.text "body", default: "", null: false
|
||||
t.text "digest", default: "", null: false
|
||||
t.text "message_franking", default: "", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["device_id"], name: "index_encrypted_messages_on_device_id"
|
||||
t.index ["from_account_id"], name: "index_encrypted_messages_on_from_account_id"
|
||||
end
|
||||
|
||||
create_table "favourites", force: :cascade do |t|
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
@ -448,10 +480,9 @@ ActiveRecord::Schema.define(version: 2020_05_10_110808) do
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["user_id", "timeline"], name: "index_markers_on_user_id_and_timeline", unique: true
|
||||
t.index ["user_id"], name: "index_markers_on_user_id"
|
||||
end
|
||||
|
||||
create_table "media_attachments", force: :cascade do |t|
|
||||
create_table "media_attachments", id: :bigint, default: -> { "timestamp_id('media_attachments'::text)" }, force: :cascade do |t|
|
||||
t.bigint "status_id"
|
||||
t.string "file_file_name"
|
||||
t.string "file_content_type"
|
||||
@ -469,6 +500,11 @@ ActiveRecord::Schema.define(version: 2020_05_10_110808) do
|
||||
t.string "blurhash"
|
||||
t.integer "processing"
|
||||
t.integer "file_storage_schema_version"
|
||||
t.string "thumbnail_file_name"
|
||||
t.string "thumbnail_content_type"
|
||||
t.integer "thumbnail_file_size"
|
||||
t.datetime "thumbnail_updated_at"
|
||||
t.string "thumbnail_remote_url"
|
||||
t.index ["account_id"], name: "index_media_attachments_on_account_id"
|
||||
t.index ["scheduled_status_id"], name: "index_media_attachments_on_scheduled_status_id"
|
||||
t.index ["shortcode"], name: "index_media_attachments_on_shortcode", unique: true
|
||||
@ -552,6 +588,17 @@ ActiveRecord::Schema.define(version: 2020_05_10_110808) do
|
||||
t.index ["uid"], name: "index_oauth_applications_on_uid", unique: true
|
||||
end
|
||||
|
||||
create_table "one_time_keys", force: :cascade do |t|
|
||||
t.bigint "device_id"
|
||||
t.string "key_id", default: "", null: false
|
||||
t.text "key", default: "", null: false
|
||||
t.text "signature", default: "", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["device_id"], name: "index_one_time_keys_on_device_id"
|
||||
t.index ["key_id"], name: "index_one_time_keys_on_key_id"
|
||||
end
|
||||
|
||||
create_table "pghero_space_stats", force: :cascade do |t|
|
||||
t.text "database"
|
||||
t.text "schema"
|
||||
@ -610,6 +657,7 @@ ActiveRecord::Schema.define(version: 2020_05_10_110808) do
|
||||
t.datetime "updated_at", null: false
|
||||
t.string "embed_url", default: "", null: false
|
||||
t.integer "image_storage_schema_version"
|
||||
t.string "blurhash"
|
||||
t.index ["url"], name: "index_preview_cards_on_url", unique: true
|
||||
end
|
||||
|
||||
@ -752,6 +800,12 @@ ActiveRecord::Schema.define(version: 2020_05_10_110808) do
|
||||
t.index ["tag_id", "status_id"], name: "index_statuses_tags_on_tag_id_and_status_id", unique: true
|
||||
end
|
||||
|
||||
create_table "system_keys", force: :cascade do |t|
|
||||
t.binary "key"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "tags", force: :cascade do |t|
|
||||
t.string "name", default: "", null: false
|
||||
t.datetime "created_at", null: false
|
||||
@ -827,6 +881,8 @@ ActiveRecord::Schema.define(version: 2020_05_10_110808) do
|
||||
t.string "chosen_languages", array: true
|
||||
t.bigint "created_by_application_id"
|
||||
t.boolean "approved", default: true, null: false
|
||||
t.string "sign_in_token"
|
||||
t.datetime "sign_in_token_sent_at"
|
||||
t.index ["account_id"], name: "index_users_on_account_id"
|
||||
t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true
|
||||
t.index ["created_by_application_id"], name: "index_users_on_created_by_application_id"
|
||||
@ -865,6 +921,8 @@ ActiveRecord::Schema.define(version: 2020_05_10_110808) do
|
||||
add_foreign_key "account_migrations", "accounts", 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_notes", "accounts", column: "target_account_id", on_delete: :cascade
|
||||
add_foreign_key "account_notes", "accounts", on_delete: :cascade
|
||||
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 "account_stats", "accounts", on_delete: :cascade
|
||||
@ -886,7 +944,11 @@ ActiveRecord::Schema.define(version: 2020_05_10_110808) do
|
||||
add_foreign_key "conversation_mutes", "accounts", name: "fk_225b4212bb", on_delete: :cascade
|
||||
add_foreign_key "conversation_mutes", "conversations", on_delete: :cascade
|
||||
add_foreign_key "custom_filters", "accounts", on_delete: :cascade
|
||||
add_foreign_key "devices", "accounts", on_delete: :cascade
|
||||
add_foreign_key "devices", "oauth_access_tokens", column: "access_token_id", on_delete: :cascade
|
||||
add_foreign_key "email_domain_blocks", "email_domain_blocks", column: "parent_id", on_delete: :cascade
|
||||
add_foreign_key "encrypted_messages", "accounts", column: "from_account_id", on_delete: :cascade
|
||||
add_foreign_key "encrypted_messages", "devices", on_delete: :cascade
|
||||
add_foreign_key "favourites", "accounts", name: "fk_5eb6c2b873", on_delete: :cascade
|
||||
add_foreign_key "favourites", "statuses", name: "fk_b0e856845e", on_delete: :cascade
|
||||
add_foreign_key "featured_tags", "accounts", on_delete: :cascade
|
||||
@ -917,6 +979,7 @@ ActiveRecord::Schema.define(version: 2020_05_10_110808) do
|
||||
add_foreign_key "oauth_access_tokens", "oauth_applications", column: "application_id", name: "fk_f5fc4c1ee3", on_delete: :cascade
|
||||
add_foreign_key "oauth_access_tokens", "users", column: "resource_owner_id", name: "fk_e84df68546", on_delete: :cascade
|
||||
add_foreign_key "oauth_applications", "users", column: "owner_id", name: "fk_b0988c7c0a", on_delete: :cascade
|
||||
add_foreign_key "one_time_keys", "devices", on_delete: :cascade
|
||||
add_foreign_key "poll_votes", "accounts", on_delete: :cascade
|
||||
add_foreign_key "poll_votes", "polls", on_delete: :cascade
|
||||
add_foreign_key "polls", "accounts", on_delete: :cascade
|
||||
|
Reference in New Issue
Block a user