Skip to content

Commit af30645

Browse files
committed
Development setup: seed script fix
The script wasn't properly updated during one of the recent DB refactorings, causing failures
1 parent 0866248 commit af30645

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

db/seeds.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ def create_message(topic:, sender:, subject:, body:, created_at:, reply_to: nil,
123123
Message.create!(
124124
topic:,
125125
sender:,
126+
sender_person: sender.person,
126127
reply_to:,
127128
subject:,
128129
body:,
@@ -173,6 +174,7 @@ def mark_aware_until(user:, topic:, message:, timestamp:)
173174
patch_topic = Topic.create!(
174175
title: "Add VACUUM progress tracking",
175176
creator: bob_alias,
177+
creator_person: bob_alias.person,
176178
created_at: base_time,
177179
updated_at: base_time
178180
)
@@ -293,6 +295,7 @@ def mark_aware_until(user:, topic:, message:, timestamp:)
293295
rfc_topic = Topic.create!(
294296
title: "RFC: New index AM hooks",
295297
creator: carol_alias,
298+
creator_person: carol_alias.person,
296299
created_at: base_time + 3.days,
297300
updated_at: base_time + 3.days
298301
)
@@ -342,6 +345,7 @@ def mark_aware_until(user:, topic:, message:, timestamp:)
342345
resolved_topic = Topic.create!(
343346
title: "Fix TOAST corruption edge case",
344347
creator: alice_alias,
348+
creator_person: alice_alias.person,
345349
created_at: base_time + 5.days,
346350
updated_at: base_time + 5.days
347351
)
@@ -368,6 +372,7 @@ def mark_aware_until(user:, topic:, message:, timestamp:)
368372
bot_topic = Topic.create!(
369373
title: "Build failed on CI",
370374
creator: ci_bot_alias,
375+
creator_person: ci_bot_alias.person,
371376
created_at: base_time + 6.days,
372377
updated_at: base_time + 6.days
373378
)
@@ -385,6 +390,7 @@ def mark_aware_until(user:, topic:, message:, timestamp:)
385390
discussion_topic = Topic.create!(
386391
title: "Logical replication improvements",
387392
creator: legacy_alias,
393+
creator_person: legacy_alias.person,
388394
created_at: base_time + 7.days,
389395
updated_at: base_time + 7.days
390396
)
@@ -482,6 +488,7 @@ def mark_aware_until(user:, topic:, message:, timestamp:)
482488
contrib_topic = Topic.create!(
483489
title: "Background worker metrics",
484490
creator: carol_alias,
491+
creator_person: carol_alias.person,
485492
created_at: base_time + 10.days,
486493
updated_at: base_time + 10.days
487494
)
@@ -513,6 +520,7 @@ def mark_aware_until(user:, topic:, message:, timestamp:)
513520
committer_topic = Topic.create!(
514521
title: "Autovacuum freeze thresholds",
515522
creator: bob_alias,
523+
creator_person: bob_alias.person,
516524
created_at: base_time + 11.days,
517525
updated_at: base_time + 11.days
518526
)
@@ -544,6 +552,7 @@ def mark_aware_until(user:, topic:, message:, timestamp:)
544552
past_topic = Topic.create!(
545553
title: "Historical patch import",
546554
creator: legacy_alias,
555+
creator_person: legacy_alias.person,
547556
created_at: base_time + 12.days,
548557
updated_at: base_time + 12.days
549558
)
@@ -564,6 +573,7 @@ def mark_aware_until(user:, topic:, message:, timestamp:)
564573
long_topic = Topic.create!(
565574
title: "Streaming replication design meeting",
566575
creator: bob_alias,
576+
creator_person: bob_alias.person,
567577
created_at: base_time + 13.days,
568578
updated_at: base_time + 13.days
569579
)
@@ -626,6 +636,7 @@ def mark_aware_until(user:, topic:, message:, timestamp:)
626636
moderate_topic_1 = Topic.create!(
627637
title: "Connection pool tuning",
628638
creator: dave_alias,
639+
creator_person: dave_alias.person,
629640
created_at: base_time + 14.days,
630641
updated_at: base_time + 14.days
631642
)
@@ -672,6 +683,7 @@ def mark_aware_until(user:, topic:, message:, timestamp:)
672683
moderate_topic_2 = Topic.create!(
673684
title: "Monitoring extension roadmap",
674685
creator: carol_alias,
686+
creator_person: carol_alias.person,
675687
created_at: base_time + 15.days,
676688
updated_at: base_time + 15.days
677689
)
@@ -719,6 +731,7 @@ def mark_aware_until(user:, topic:, message:, timestamp:)
719731
five_part_topic = Topic.create!(
720732
title: "Five participant sampler",
721733
creator: alice_alias,
734+
creator_person: alice_alias.person,
722735
created_at: base_time + 16.days,
723736
updated_at: base_time + 16.days
724737
)
@@ -749,6 +762,7 @@ def mark_aware_until(user:, topic:, message:, timestamp:)
749762
six_part_topic = Topic.create!(
750763
title: "Six participant sampler",
751764
creator: bob_alias,
765+
creator_person: bob_alias.person,
752766
created_at: base_time + 17.days,
753767
updated_at: base_time + 17.days
754768
)
@@ -784,6 +798,7 @@ def mark_aware_until(user:, topic:, message:, timestamp:)
784798
topic = Topic.create!(
785799
title: "Archive sampler #{i}",
786800
creator: creator,
801+
creator_person: creator.person,
787802
created_at: created_at,
788803
updated_at: created_at
789804
)
@@ -830,6 +845,7 @@ def mark_aware_until(user:, topic:, message:, timestamp:)
830845
recent_topic = Topic.create!(
831846
title: "Recent activity thread",
832847
creator: alice_alias,
848+
creator_person: alice_alias.person,
833849
created_at: now - 2.days,
834850
updated_at: now - 2.days
835851
)
@@ -857,6 +873,7 @@ def mark_aware_until(user:, topic:, message:, timestamp:)
857873
old_topic = Topic.create!(
858874
title: "Previous year discussion",
859875
creator: carol_alias,
876+
creator_person: carol_alias.person,
860877
created_at: old_topic_time,
861878
updated_at: old_topic_time
862879
)

0 commit comments

Comments
 (0)