0
0
Fork 0

Add profile directory (#9427)

Fix #5578
This commit is contained in:
Eugen Rochko 2018-12-06 17:36:11 +01:00 committed by GitHub
parent 155cf12680
commit 73be8f38c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 578 additions and 7 deletions

View file

@ -0,0 +1,8 @@
class CreateAccountsTagsJoinTable < ActiveRecord::Migration[5.2]
def change
create_join_table :accounts, :tags do |t|
t.index [:account_id, :tag_id]
t.index [:tag_id, :account_id], unique: true
end
end
end

View file

@ -0,0 +1,5 @@
class AddDiscoverableToAccounts < ActiveRecord::Migration[5.2]
def change
add_column :accounts, :discoverable, :boolean
end
end

View file

@ -0,0 +1,5 @@
class AddLastStatusAtToAccountStats < ActiveRecord::Migration[5.2]
def change
add_column :account_stats, :last_status_at, :datetime
end
end

View file

@ -0,0 +1,11 @@
class CreateAccountTagStats < ActiveRecord::Migration[5.2]
def change
create_table :account_tag_stats do |t|
t.belongs_to :tag, null: false, foreign_key: { on_delete: :cascade }, index: { unique: true }
t.bigint :accounts_count, default: 0, null: false
t.boolean :hidden, default: false, null: false
t.timestamps
end
end
end