Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

I know they used their own ORM (dapper). However, did their manually update the database for each corresponding change? Did they use a database first or a model first approach?

What I meant by manual update of the database is that there are some web developers that change their domain model during development (e.g., add an email property to the "User" class); then they add a column in the "User" table in the database to reflect this. I know that there are frameworks that handle the database changes automatically. However, since Stack Exchange software uses dapper, I was wondering how the programmers approached this in this case.

share|improve this question

migrated from Jul 30 '11 at 18:41

This question came from our site for professional and enthusiast programmers.

Honestly not sure if this is best on SO or MSO, but if you really want to know, our usual process would be database first:

  • add any new column as nullable
  • the db / app changes are deployed roughly at the same time, DB first; the nullable nature means that no inserts will fail in the time between DB deployment and app deployment. The time between the two will be between minutes and maybe an hour
  • backfill any data if needed (this could be part of the DB deployment on separate)
  • maybe later make it non-nullable if this is reliable

Obviously any specific scenario may require deviation from this.

The choice of ORM is unrelated here; I suspect the same approach would apply either way. As it happens we use a mix of dapper and LINQ-to-SQL. I personally find the DBML designer gets a bit messy after the fact, so I typically edit the DBML by hand rather than using the designer. This then updates the object model shared between L2S and dappper.

share|improve this answer
While on the subject, and you're around, there's dbase trouble right now. The questions/tagged/whatever pages are not updating for the past hour. Happened before. – Uphill Luge Jul 30 '11 at 21:33
@Hans can't repro - ? example ? – Marc Gravell Jul 30 '11 at 22:27
It got fixed by somebody. You could look at and note the one hour gap. Never mind. – Uphill Luge Jul 30 '11 at 22:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .