File tree Expand file tree Collapse file tree 5 files changed +125
-5
lines changed Expand file tree Collapse file tree 5 files changed +125
-5
lines changed Original file line number Diff line number Diff line change 11- name : Version 2.x
22 href : v2.x/toc.yml
3- topicHref : v2.x/
3+ topicHref : v2.x/index.md
44- name : Version 3.x
55 href : v3.x/
66 topicHref : v3.x/index.md
7+ - name : Version 4.x
8+ href : v4.x/
9+ topicHref : v4.x/index.md
10+ - name : Version 5.x
11+ href : v5.x/
12+ topicHref : v5.x/index.md
Original file line number Diff line number Diff line change 1- # FluentMigrator API
21
3- The most important part of the API is the [ migration runner ] ( xref:FluentMigrator.Runner.IMigrationRunner ) .
2+ # API for version 3.x
43
5- # Getting started
4+ # Using the in-process runner
65
7- The starting point for every beginner of FluentMigrator is the [ Quickstart tutorial] ( xref:quickstart.md ) .
6+ ``` cs
7+ // Create the announcer to output the migration messages
8+ var announcer = new ConsoleAnnouncer ();
9+
10+ // Processor specific options (usually none are needed)
11+ var options = new ProcessorOptions ();
12+
13+ // Use SQLite
14+ var processorFactory = new SQLiteProcessorFactory ();
15+
16+ // Initialize the processor
17+ using (var processor = processorFactory .Create (
18+ // The SQLite connection string
19+ " Data Source=test.db" ,
20+ announcer ,
21+ options ))
22+ {
23+ // Configure the runner
24+ var context = new RunnerContext (announcer );
25+
26+ // Create the migration runner
27+ var runner = new MigrationRunner (
28+ // Specify the assembly with the migrations
29+ typeof (MyMigration ).Assembly ,
30+ context ,
31+ processor );
32+
33+ // Run the migrations
34+ runner .MigrateUp ();
35+ }
36+ ```
Original file line number Diff line number Diff line change 1+
2+ # API for version 4.x
3+
4+ # Using the in-process runner
5+
6+ ``` cs
7+ // Create the announcer to output the migration messages
8+ var announcer = new ConsoleAnnouncer ();
9+
10+ // Processor specific options (usually none are needed)
11+ var options = new ProcessorOptions ();
12+
13+ // Use SQLite
14+ var processorFactory = new SQLiteProcessorFactory ();
15+
16+ // Initialize the processor
17+ using (var processor = processorFactory .Create (
18+ // The SQLite connection string
19+ " Data Source=test.db" ,
20+ announcer ,
21+ options ))
22+ {
23+ // Configure the runner
24+ var context = new RunnerContext (announcer );
25+
26+ // Create the migration runner
27+ var runner = new MigrationRunner (
28+ // Specify the assembly with the migrations
29+ typeof (MyMigration ).Assembly ,
30+ context ,
31+ processor );
32+
33+ // Run the migrations
34+ runner .MigrateUp ();
35+ }
36+ ```
Original file line number Diff line number Diff line change 1+ # FluentMigrator API
2+
3+ The most important part of the API is the [ migration runner] ( xref:FluentMigrator.Runner.IMigrationRunner ) .
4+
5+ # Getting started
6+
7+ The starting point for every beginner of FluentMigrator is the [ Quickstart tutorial] ( xref:quickstart.md ) .
Original file line number Diff line number Diff line change 4141 "properties" : {
4242 "TargetFramework" : " net461"
4343 }
44+ },
45+ {
46+ "src" : [
47+ {
48+ "src" : " fm-v4.x/src" ,
49+ "files" : [
50+ " **.csproj"
51+ ],
52+ "exclude" : [
53+ " FluentMigrator.DotNet.Cli/**" ,
54+ " FluentMigrator.Console/**" ,
55+ " FluentMigrator.MSBuild/**"
56+ ]
57+ }
58+ ],
59+ "dest" : " api/v4.x" ,
60+ "filter" : " api-filter.yml" ,
61+ "disableGitFeatures" : true ,
62+ "properties" : {
63+ "TargetFramework" : " net461"
64+ }
65+ },
66+ {
67+ "src" : [
68+ {
69+ "src" : " fm-v5.x/src" ,
70+ "files" : [
71+ " **.csproj"
72+ ],
73+ "exclude" : [
74+ " FluentMigrator.DotNet.Cli/**" ,
75+ " FluentMigrator.Console/**" ,
76+ " FluentMigrator.MSBuild/**"
77+ ]
78+ }
79+ ],
80+ "dest" : " api/v5.x" ,
81+ "filter" : " api-filter.yml" ,
82+ "disableGitFeatures" : true ,
83+ "properties" : {
84+ "TargetFramework" : " net461"
85+ }
4486 }
4587 ],
4688 "build" : {
You can’t perform that action at this time.
0 commit comments