what are the recommended ways to deploy databases for any application installation.

options:

1. Attaching mdf and ldf files :

Pros : no need to generate scripts. Database can be picked from production and deployed.

Cons : Production database has test data which is accumulated during testing and debugging. Databases also has some system data \ business logic data used by the application. Code has to be written to delete the test data and retain the system data.

Code has to updated with every change in database.


2. Generate scripts :
Pros : hassle free Installer with less number of files. No data deletion required

Cons : Code has to be written to insert the system data.


I am looking for a long term solution to work with all my applications and clients

Are there any other things which I should consider before deciding any of them.

Are there any other approaches?