Opened 11 years ago

Closed 9 years ago

#469 closed enhancement (fixed)

Warn when the database structures need “./bin/gmg dbupdate”

Reported by: Aleksej Owned by:
Priority: major Milestone:
Component: programming Keywords:
Cc: Stephen Compall, Simon Fondrie-Teitler Parent Tickets:

Description

Sometimes the database structures need to be generated using “./bin/gmg dbupdate”.

E.g. when there is no database yet, this is necessary for GMG to start.
When you add media types, it is necessary to be able to store the media of those types (GMG transcoded a video clip but failed to store it).

Subtickets

Change History (7)

comment:1 Changed 10 years ago by Will Kahn-Greene

Milestone: 0.3.1

Where would the warnings show up and what would trigger them?

comment:2 Changed 10 years ago by Stephen Compall

Cc: Stephen Compall added

comment:3 in reply to:  1 Changed 10 years ago by Simon Fondrie-Teitler

Replying to willkg:

Where would the warnings show up and what would trigger them?

Having just spent a while debugging something that turned out to be gmg dbupdate not getting the correct config file, I was going to file this exact ticket. In my case I was actually able to upload an audio file and have it show up and work, however I was not able to fully delete it.

I recommend that mediagoblin not start, or at least print out a very nasty warning on the console, if the db does not reflect the correct database state. This can be done by running through the same commands that db uses to figure out how to update the db, and making sure that those tables exist.

Thoughts?

comment:4 Changed 10 years ago by Simon Fondrie-Teitler

Cc: Simon Fondrie-Teitler added

comment:5 Changed 10 years ago by Christopher Allan Webber

The ideal situation is that the application should both spit a warning to the console at the very least and either shut down or instead of showing the normal application, run a minimalist application that explains that the administrator needs to update the database to match the present system.

comment:6 Changed 9 years ago by rodney757

Status: newreview

Here is my solution for this, https://github.com/rodney757/mediagoblin/tree/dbupdate. I'm not sure if this is the cleanest way to quit the app though.

comment:7 Changed 9 years ago by Christopher Allan Webber

Resolution: fixed
Status: reviewclosed

Probably not the cleanest way to quit the app, but it works. Good enough for me for now! ;)

Committed to master! Thanks Rodney!

Note: See TracTickets for help on using tickets.