I teach my college students to periodically script out their databases so that they can run the script to create the entire project on any system. I use this to check their homework, and to teach them about source-code control.
We use the scripting wizard in SQL Server Management Studio (SSMS) and select most of the options as we go to get all objects and even the data. But in SQL Server 2008 RTM, you can actually miss a few tables this way. This is corrected in SQL Server 2008 SP1.
It’s interesting how we found it – I told the students not only to create the scripts, but to run them. That’s when the error first appeared. This reinforces that you have to test your processes – you can’t blindly trust that things are working as you assume they are.