Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.74 KB | None | 0 0
  1. Software requirements
  2. IIS - Installation instructions
  3. SQL Server 2014 or later - Download
  4. Visual Studio 2019 - Download
  5. .Net Framework 4.6.1 - Download
  6. .Net Core 3.0 - Download
  7. .Net Core Hosting Bundle (Required for hosting on IIS) - Download
  8. Recommended software
  9. Cmder - Realy nice terminal for Windows - Download
  10. First time setup
  11. Using you favourite terminal, position yourself in the root directory of the repository.
  12. Run command go go. This will:
  13. Fetch all nuget dependencies and build the solution.
  14. Run database migrations, creating the database if it does not exist. It is recommended to run go go whenever you fetch the new code from repository.
  15. How to run the application
  16. To run the robot web service backend: run command go run BotsPotsChef and open http://localhost:5000 in you browser.
  17. To run the robot management deslopt app: run command go run BotsPotsKonzola
  18. Alternatively, just run the resired project project from Visual Studio.
  19. Working with database migrations
  20. Database development (schema, any mandatory hard-coded data and also test data for local development) is kept in source control in the form of database migrations. Database migrations are scripts that gradually evolve database schema and data as the application development progresses.
  21. In this project, we use Fluent Migrator as a framework for managing and defining our database migrations. Under this model, each migration is a single C# class that know how to upgrade (and possibly downgrade) database schema from previous to next version. Migrations are kept under Migrations folder in DatabaseMigrations project. Each migration class is kept in it's own file.
  22. Fluent Migrator knows how to run the database migrations that have not yet been run, and applies them in sequential order (based on version number defined in each migration). The framework keeps track of which migrations have been executed in migrations.VersionInfo table in the database.
  23. Available migration commands
  24. To run all unapplied database migrations, run command go mig run. This will also create a database if it doesn't already exist.
  25. To rollback the database to previous version, run go mig rollback -1 (or -2, or -N, depending on how many previous migrations you wish to undo). If some migrations are irreversible, this operation will fail.
  26. To add a new migration, run command go mig add NameOfMigration. This will add a new migration file under DatabaseMigrations\Migrations folder with our desired naming convention. Go ahead and edit this newly added file to add any migration logic.
  27. It is impossible to edit migrations after they have been applied. Any changes made to migration scripts will simply be ignored if that migration has already been applied.
  28. For this reason it very important to not edit any migration files that have already been pushed to the github repository. Even for migrations that have not yet been pushed, editing will not work correctly if you have applied them localy. If you really want to edit a migration you have already applied (but not pushed), you will have to delete the database and recreate it from scratch.
  29. Available command-line commands
  30. go go
  31. go clean
  32. go build
  33. go rebuild
  34. go run
  35. go run-all
  36. go run-async
  37. go watch
  38. go watch-async
  39. go mig run
  40. go mig rerun
  41. go mig rollback
  42. go mig drop
  43. go mig add
  44. go publish
  45. Configuring local development machine-specific settings
  46. If you want to overwrite any setting from appsettings.json or appsettings.{enviornment}.json while running locally on development machine, create a file called appsettings.local.json in src folder (you can just copy the provided appsettings.local.json.template).
  47. When you run the application under Development environment, any setting that are set in that file will take precedence over the global or environment-specific settings.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement