mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 09:13:39 +08:00
DEV: Refactor migrations-tooling
* Updates GitHub Action for migrations * Rubocop: Always `EnforcedShorthandSyntax` for hashes in the `migrations` directory * Automatically load all available converter steps * Enable YJIT at runtime, if available * Progressbar shows skipped records and other small improvements
This commit is contained in:

committed by
Gerhard Schlager

parent
7b5839ec44
commit
71a90dcba2
@ -20,7 +20,7 @@ User = Data.define(:id, :name, :email, :created_at)
|
||||
USER_HASH =
|
||||
begin
|
||||
name = SecureRandom.hex(10)
|
||||
{ id: 1, name: name, email: "#{name}@example.com", created_at: Time.now.utc.iso8601 }
|
||||
{ id: 1, name:, email: "#{name}@example.com", created_at: Time.now.utc.iso8601 }
|
||||
end
|
||||
|
||||
USER_DATA =
|
||||
|
@ -41,7 +41,7 @@ end
|
||||
def create_users(row_count)
|
||||
row_count.times.map do |id|
|
||||
name = SecureRandom.hex(10)
|
||||
{ id: id, name: name, email: "#{name}@example.com", created_at: Time.now.utc.iso8601 }
|
||||
{ id:, name:, email: "#{name}@example.com", created_at: Time.now.utc.iso8601 }
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user