Mailinglist Archive: opensuse-web (13 mails)

< Previous Next >
Re: [opensuse-web] Pg Port of OSEM now live
On 01/05/2017 06:51 PM, Joshua D. Drake wrote:

Thought you would like to see the results of a *LOT* of work:



3. The model

* With the greatest respect to the awesome conference application
you have written, it is clear that a DBA wasn't involved. One of the
first things I noticed was the table events has a column called state.
The current value of this is one of: confirmed, new, unconfirmed
rejected etc...

However, there is zero constraints to this column. At a minimum we need
a check constraint on that column. In a better world it would be a
foreign key to a look up table.

Well, that's opinionated... and quite DBA centric. :-) I also come from
a database intensive background and I used to do things like having a
table for storing the different states. But that's not how things are
done in Ruby on Rails, and it's for good reasons.

I agree that a text field is not an optimal solution either (I would
prefer ActiveHash or ActiveRecord::Enum), but the definition of "better
world" may vary based in the experience of the developers. :-)

Ancor González Sosa
YaST Team at SUSE Linux GmbH
To unsubscribe, e-mail: opensuse-web+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-web+owner@xxxxxxxxxxxx

< Previous Next >
List Navigation
Follow Ups