Baseline replacing collection with board across code

This commit is contained in:
Jorge Manrubia
2025-11-05 13:31:54 +01:00
parent 8caaad0105
commit 03a345609e
269 changed files with 990 additions and 990 deletions
+5 -5
View File
@@ -2,20 +2,20 @@ require_relative "../config/environment"
require "faker"
CARDS_COUNT = ARGV.first&.to_i || 10_000
COLLECTIONS_COUNT = ARGV.second&.to_i || 1
BOARDS_COUNT = ARGV.second&.to_i || 1
ApplicationRecord.current_tenant = ApplicationRecord.tenants.first
Current.session = Session.first
puts "Creating #{CARDS_COUNT} cards across #{COLLECTIONS_COUNT} collection(s)"
puts "Creating #{CARDS_COUNT} cards across #{BOARDS_COUNT} board(s)"
COLLECTIONS_COUNT.times do
Collection.create! name: Faker::Company.buzzword, all_access: true
BOARDS_COUNT.times do
Board.create! name: Faker::Company.buzzword, all_access: true
print "."
end
CARDS_COUNT.times do
card = Collection.take.cards.create! \
card = Board.take.cards.create! \
title: Faker::Company.bs, description: Faker::Hacker.say_something_smart, status: :published
print "."