IT:AD:Db Projects
Process
* A Quick Intro
- Tip: After adding a Table, Right Click, Select 'View Objects in Schema View' to edit a little more easily.
- See: Blog
* In depth considerations on deployment:
Importing Existing Dbs
- Ensure its a Database Project (not a Server Project)…easy mistake to make
- Right Click Project, Import
- To Export, Publish, after setting a connection string, and new Db Name
- To Add Lookup and other Seed Info,
- For more info:
Adding Seed info to Deployment Projects
- Right click PostDeployment Script
- Select SqlCmd mode
- Ref a file
- :r .\seed.sql
* Add seed.sql and add statements there. * *Important:* *.sql file should contain if/else to not duplicate entries. IF NOT EXISTS (SELECT 1 from dbo.DbSchemaVersionInfo WHERE NameLowered='comp.app' Where Version > '0.0.1') BEGIN --Do something... END