Skip to content

Commit 34626b8

Browse files
authored
Update schema to reflect full db:migrate run results (mastodon#31128)
1 parent 4d374cf commit 34626b8

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

db/schema.rb

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@
194194
t.integer "avatar_storage_schema_version"
195195
t.integer "header_storage_schema_version"
196196
t.string "devices_url"
197-
t.integer "suspension_origin"
198197
t.datetime "sensitized_at", precision: nil
198+
t.integer "suspension_origin"
199199
t.boolean "trendable"
200200
t.datetime "reviewed_at", precision: nil
201201
t.datetime "requested_review_at", precision: nil
@@ -579,12 +579,12 @@
579579
end
580580

581581
create_table "ip_blocks", force: :cascade do |t|
582-
t.datetime "created_at", precision: nil, null: false
583-
t.datetime "updated_at", precision: nil, null: false
584-
t.datetime "expires_at", precision: nil
585582
t.inet "ip", default: "0.0.0.0", null: false
586583
t.integer "severity", default: 0, null: false
584+
t.datetime "expires_at", precision: nil
587585
t.text "comment", default: "", null: false
586+
t.datetime "created_at", precision: nil, null: false
587+
t.datetime "updated_at", precision: nil, null: false
588588
t.index ["ip"], name: "index_ip_blocks_on_ip", unique: true
589589
end
590590

@@ -1421,9 +1421,9 @@
14211421
add_index "instances", ["domain"], name: "index_instances_on_domain", unique: true
14221422

14231423
create_view "user_ips", sql_definition: <<-SQL
1424-
SELECT t0.user_id,
1425-
t0.ip,
1426-
max(t0.used_at) AS used_at
1424+
SELECT user_id,
1425+
ip,
1426+
max(used_at) AS used_at
14271427
FROM ( SELECT users.id AS user_id,
14281428
users.sign_up_ip AS ip,
14291429
users.created_at AS used_at
@@ -1440,7 +1440,7 @@
14401440
login_activities.created_at
14411441
FROM login_activities
14421442
WHERE (login_activities.success = true)) t0
1443-
GROUP BY t0.user_id, t0.ip;
1443+
GROUP BY user_id, ip;
14441444
SQL
14451445
create_view "account_summaries", materialized: true, sql_definition: <<-SQL
14461446
SELECT accounts.id AS account_id,
@@ -1461,9 +1461,9 @@
14611461
add_index "account_summaries", ["account_id"], name: "index_account_summaries_on_account_id", unique: true
14621462

14631463
create_view "global_follow_recommendations", materialized: true, sql_definition: <<-SQL
1464-
SELECT t0.account_id,
1465-
sum(t0.rank) AS rank,
1466-
array_agg(t0.reason) AS reason
1464+
SELECT account_id,
1465+
sum(rank) AS rank,
1466+
array_agg(reason) AS reason
14671467
FROM ( SELECT account_summaries.account_id,
14681468
((count(follows.id))::numeric / (1.0 + (count(follows.id))::numeric)) AS rank,
14691469
'most_followed'::text AS reason
@@ -1487,8 +1487,8 @@
14871487
WHERE (follow_recommendation_suppressions.account_id = statuses.account_id)))))
14881488
GROUP BY account_summaries.account_id
14891489
HAVING (sum((status_stats.reblogs_count + status_stats.favourites_count)) >= (5)::numeric)) t0
1490-
GROUP BY t0.account_id
1491-
ORDER BY (sum(t0.rank)) DESC;
1490+
GROUP BY account_id
1491+
ORDER BY (sum(rank)) DESC;
14921492
SQL
14931493
add_index "global_follow_recommendations", ["account_id"], name: "index_global_follow_recommendations_on_account_id", unique: true
14941494

0 commit comments

Comments
 (0)