Skip to content

AdventureWorks database schema sample with FluentMigration

Notifications You must be signed in to change notification settings

apsys-mx/adventureworks.migrations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AdventureWorks Database

For developers building data access libraries, components or any piece or code reading or writing in a database, it's useful to have a database schema with the most common conditions found in a real-worl application. One of the sample database used by developers to achieve this is the AdventureWorks sample database for SQLServer

This database sample an other databases can be found in the link: https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql/linq/downloading-sample-databases

This project is an effort for having a common database schema for other database provider just than SqlServer

Note: This project creates only the database schema, without data.

Installing

  1. Clone the repository in you local development folder
  2. Run dotnet build src/apsys.adventureworks.migrations.sln
  3. Create a database in your database instance with name 'AdventureWorks'. This name is optional. Just take care that the name matches with the database's name used in the connection string passed in the step 5
  4. Open a console and change the location to the build result folder. Depending of your configuration, this folder can be like src/apsys.adventureworks.migrations/bin/debug/netcoreapp3.1/
  5. On the build result folder execute apsys.adventureworks.migrations.exe /cnn:"YourSqlServerDatabaseConnectionStringHere" /provider:"YouProviderName"

YouProviderName must be replaced with the name of the database provider. Use sqlserver for Microsoft SqlServer database. Use mysql for MySql database

YourSqlServerDatabaseConnectionStringHere must be replaced with the connection string to your database. For Microsoft SqlServer can be like Server=localhost\SQLEXPRESS;Database=AdventureWorks;Trusted_Connection=True;

Related project

Migrator.NET / FluentMigration

https://github.com/fluentmigrator/fluentmigrator

Fluent Migrator is a migration framework for .NET. It's used to control the changes realized in the database schemas. It allows to keep on single base code for all supported databases

About

AdventureWorks database schema sample with FluentMigration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published