HarmonyHacks / Dahlia

Retreat waiting list management system
19 stars 3 forks source link

Changed the database code to use either SQLite or SQL Server #21

Closed SaintGimp closed 13 years ago

SaintGimp commented 13 years ago

Changed the database code to use a disk-based SQLite database by default for development purposes, or it can use a SQL Server databse (Express or full) in production. The type of database to use is inferred from the connection string, where anything referring to a .db file as the data source is considered to be a SQLite db and anything else is SQL Server. This closes GH-17.

This is intended to promote a "just clone, build, and run" onboarding experience for new developers as well as to get rid of the obnoxiousness around having the .mdf checked in to the repository.

I pushed these changes to a temporary AppHarbor app and verified that it works fine with a SQL Server database. Just create the AppHarbor SQL Server database with the name of "dahliaSQL" and it fixes up the connection string correctly.

Comments? I'm looking at you, Bobby!

olsonjeffery commented 13 years ago

This is definitely something that has needed to happen for a while and this cover the default, develop-side scenario as well as deployment to appharbor (via their conn string replacement scheme that Eric details)..

It's probably good enough for now. I keep wanting to say something intelligent about how we need some "per-environment configs" (as I mentioned in gh-17), but it's most likely overkill for what we actually need to work. I don't even recall the justification for our move from sqlite to sql express during the hackathon (given that none of our persistence needs have changed\evolved, since we've completely abstracted the db via NH).

So yeah, I guess give Eric or Bobby a chance to pipe up and then +1 for a merge. You're a machine, Eric.