Computer
Computer

Reputation: 2227

How to migrate Code First changes to production

I've been going through some tutorials and was comfortable with Entity Framework 6.xx where I created database tables, changes etc using migrations.

I deployed the database and then made more changes to local database by adding more tables, renaming columns etc.

How do I upload these changes for the database hosted on the production server?

So far I've been using database scripts and using database comparison tools but I feel I may be missing a trick if it can be easily done in a development environment by a couple of commands?

Upvotes: 0

Views: 1253

Answers (1)

David Browne - Microsoft
David Browne - Microsoft

Reputation: 88971

The recommended way to deploy migrations to a production database is by generating SQL scripts.

In EF Core: Applying Migrations or EF 6

Or use for EF Core use Bundles.

Upvotes: 1

Related Questions