Project

General

Profile

Bug #28838

don't seed on startup if migrations are pending

Added by Tomer Brisker 4 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
DB migrations
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

running seeds on startup could cause unexpected issues if there are pending migrations, in that case it is better to bail and inform the user that migrations need to run.


Related issues

Related to Foreman - Feature #28519: Allow storing if db:seed is required within the DB.Closed

Associated revisions

Revision 3c6b140f (diff)
Added by Tomer Brisker 3 months ago

Fixes #28838, #28931 - Safer seeding on initialization

Make sure that migartions have run before attempting to run seeds, to
ensure we don't get into a wierd state of the database if the app is
started before the db has been migrated.
Also, catch and log errors during seeding to prevent passanger from
failing to start if an error occurs.

History

#1 Updated by Tomer Brisker 4 months ago

  • Related to Feature #28519: Allow storing if db:seed is required within the DB. added

#2 Updated by Tomer Brisker 4 months ago

  • Target version set to 2.0.0

#3 Updated by The Foreman Bot 3 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/7459 added

#4 Updated by The Foreman Bot 3 months ago

  • Fixed in Releases 2.1.0 added

#5 Updated by Tomer Brisker 3 months ago

  • Status changed from Ready For Testing to Closed

#6 Updated by Tomer Brisker 3 months ago

  • Fixed in Releases 2.0.0 added
  • Fixed in Releases deleted (2.1.0)

Also available in: Atom PDF