Skip to content

Commit

Permalink
Feat(#67) Add some more base data for Cause development database.
Browse files Browse the repository at this point in the history
  • Loading branch information
iamkinetic committed Aug 3, 2018
1 parent 986a1ce commit 392287c
Show file tree
Hide file tree
Showing 6 changed files with 409 additions and 185 deletions.
16 changes: 13 additions & 3 deletions Survi.Prevention.DataLayer/AboutMigrations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,20 @@

These are two of the ways to correctly run the migration dotnet cli:

Using the Package Manager Console :
1. Select Survi.Prevention.DataLayer as your Defautl project.
Using the Package Manager Console (the easiest way) :
1. Select Survi.Prevention.DataLayer as your Default project.
2. Go to the Survi.Prevention.DataLayer folder.
3. You can now run your command (ex: dotnet ef migrations add CreateDatabase)
3. You can now run your command.

These are some of the available command :
* Add-Migration <name> --> Add a new migration on top of the previous one (or add the first one).
* Remove-Migration --> Remove previous migration.
* Drop-Database --> Delete current database (use cautiously!)
* Update-Database <version> --> Update the database to the latest version or create it if it doesn't exist. The version is optional.

*** Note that Update-Database can be use to revert to a previous version.

---------------------------------------------------------------------------------

Using a windows command prompt:
1. Go to the Survi.Prevention.DataLayer's folder.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public static void SeedInitialData(this ModelBuilder builder)

public static void SeedInitialDataForDevelopment(this ModelBuilder builder)
{
/*InitialDataForCauca.SeedInitialGeographicData(builder);
InitialDataForCauca.SeedInitialCityTypes(builder);*/
InitialDataForCauca.SeedInitialGeographicData(builder);
InitialDataForCauca.SeedInitialCityTypes(builder);
}

private static void SeedInitialFireResistanceType(ModelBuilder builder)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 392287c

Please sign in to comment.