LoginSignup
3
0

More than 3 years have passed since last update.

[VisualStudio For Mac] DBスキーマ更新, add-migration, update-database

Last updated at Posted at 2019-09-17

普段はWindowsマシーンでVisual Studio Professionalを使っていますが、修理に出していて今週はMacを使っています。 使い慣れてなくて・・効率が悪いのですが、いい機会なので克服しようと思います。

SQLのスキーマ更新

普段はPackageManagerConsoleから add-migration [Name], update-database と言う感じに更新しているのですが、パッケージコンソール?はリードオンリーのようで・・色々調べました。

コマンドラインから、プロジェクトのフォルダーに移動、そこから

マイグレーションの追加

dotnet ef migrations add [Migration Name]

DBの更新

dotnet ef database update

結果

image.png

参考ページ
SQL Server with .NET Core and EntityFramework on Mac

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0