ASP.NET MVC 4, Migrations - How to run 'update-database' on a production server

前端 未结 7 772
Happy的楠姐
Happy的楠姐 2021-01-31 04:02

I can use package manager to run \'update-database -verbose\' locally.

Probably a stupid question but I can\'t find it online - once my website is deployed - how can I r

7条回答
  •  南笙
    南笙 (楼主)
    2021-01-31 04:16

    For us, the DBAs are the only group to have access to the production (and pre-production) environments. We simply use the Update-Database -Script package console command to get the Sql required to update the database. This gets handed off to them where they can validate it, etc.

    Maybe a little too simplistic for some but it works.

    HTH.

提交回复
热议问题