Add account migration UI (#11846)
Fix #10736 - Change data export to be available for non-functional accounts - Change non-functional accounts to include redirecting accounts
This commit is contained in:
parent
b6df9c1067
commit
3ed94dcc1a
31 changed files with 542 additions and 73 deletions
12
db/migrate/20190914202517_create_account_migrations.rb
Normal file
12
db/migrate/20190914202517_create_account_migrations.rb
Normal file
|
@ -0,0 +1,12 @@
|
|||
class CreateAccountMigrations < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :account_migrations do |t|
|
||||
t.belongs_to :account, foreign_key: { on_delete: :cascade }
|
||||
t.string :acct, null: false, default: ''
|
||||
t.bigint :followers_count, null: false, default: 0
|
||||
t.belongs_to :target_account, foreign_key: { to_table: :accounts, on_delete: :nullify }
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
11
db/migrate/20190915194355_create_account_aliases.rb
Normal file
11
db/migrate/20190915194355_create_account_aliases.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
class CreateAccountAliases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :account_aliases do |t|
|
||||
t.belongs_to :account, foreign_key: { on_delete: :cascade }
|
||||
t.string :acct, null: false, default: ''
|
||||
t.string :uri, null: false, default: ''
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
23
db/schema.rb
23
db/schema.rb
|
@ -15,6 +15,15 @@ ActiveRecord::Schema.define(version: 2019_09_17_213523) do
|
|||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
||||
create_table "account_aliases", force: :cascade do |t|
|
||||
t.bigint "account_id"
|
||||
t.string "acct", default: "", null: false
|
||||
t.string "uri", default: "", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["account_id"], name: "index_account_aliases_on_account_id"
|
||||
end
|
||||
|
||||
create_table "account_conversations", force: :cascade do |t|
|
||||
t.bigint "account_id"
|
||||
t.bigint "conversation_id"
|
||||
|
@ -49,6 +58,17 @@ ActiveRecord::Schema.define(version: 2019_09_17_213523) do
|
|||
t.index ["account_id"], name: "index_account_identity_proofs_on_account_id"
|
||||
end
|
||||
|
||||
create_table "account_migrations", force: :cascade do |t|
|
||||
t.bigint "account_id"
|
||||
t.string "acct", default: "", null: false
|
||||
t.bigint "followers_count", default: 0, null: false
|
||||
t.bigint "target_account_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["account_id"], name: "index_account_migrations_on_account_id"
|
||||
t.index ["target_account_id"], name: "index_account_migrations_on_target_account_id"
|
||||
end
|
||||
|
||||
create_table "account_moderation_notes", force: :cascade do |t|
|
||||
t.text "content", null: false
|
||||
t.bigint "account_id", null: false
|
||||
|
@ -768,10 +788,13 @@ ActiveRecord::Schema.define(version: 2019_09_17_213523) do
|
|||
t.index ["user_id"], name: "index_web_settings_on_user_id", unique: true
|
||||
end
|
||||
|
||||
add_foreign_key "account_aliases", "accounts", on_delete: :cascade
|
||||
add_foreign_key "account_conversations", "accounts", on_delete: :cascade
|
||||
add_foreign_key "account_conversations", "conversations", on_delete: :cascade
|
||||
add_foreign_key "account_domain_blocks", "accounts", name: "fk_206c6029bd", on_delete: :cascade
|
||||
add_foreign_key "account_identity_proofs", "accounts", on_delete: :cascade
|
||||
add_foreign_key "account_migrations", "accounts", column: "target_account_id", on_delete: :nullify
|
||||
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_pins", "accounts", column: "target_account_id", on_delete: :cascade
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue