MushroomObserver / mushroom-observer

A website for sharing observations of mushrooms.
https://mushroomobserver.org
MIT License
78 stars 25 forks source link

Remove default values for UserStats created_at and updated_at #2099

Closed mo-nathan closed 5 months ago

mo-nathan commented 5 months ago

The original UserStats migration was using Time.zone.now as the default for the created_at and updated_at fields. This creates instability with db/schema.rb since any time the migration gets run it will use a different value. This will create a maintenance burden for developers. This PR eliminates that need since I see no evidence that it is required despite the title of this commit: https://github.com/MushroomObserver/mushroom-observer/commit/43d8757914c204d4c084e2d82bc620075f40d0e9. If it required (please provide documentation), then we should set it to some explicit date like '2024-01-01 00:00:00' rather than a dynamic value like Time.zone.now.

coveralls commented 5 months ago

Coverage Status

coverage: 94.395%. remained the same when pulling fd4509f5b528585a5d8ba48fae7f5064f9a0e804 on njw-remove-date-defaults into 4ee291f772eec70b0a47844aaaa6295d8f2e593b on main.

nimmolo commented 5 months ago

Thanks for doing this.