You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/console.md
+13-7Lines changed: 13 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ For check available options use command `apply --help`.
21
21
22
22
*`-f [file] [file] or --files [file] [file]` - [required] List of files containing migrations.
23
23
*`-c [string] [string] or --connectionStrings [string] [string]` - [required] List of connection strings to which migrations will be applied.
24
-
*`-s [string] or --strategy [string]` - [default = MigrationResolverAttribute] Select strategy for read migrations.
24
+
*`-s [string] or --strategy [string]` - [default = CSharpClasses] Select strategy for read migrations.
25
25
*`-g [string] or --group [string]` - If you specify some group or groups (separated by commas), migrations will be filtered by these groups
26
26
*`-t [string] or --tablename [string]` - You can change the name of the table in which the migrations will be stored.
27
27
@@ -31,7 +31,7 @@ For check available options use command `revert --help`.
31
31
*`-m [number] or --migration [number]` - [required] The parameter specifies the number of the migration to which you want to roll back the changes
32
32
*`-f [file] [file] or --files [file] [file]` - [required] List of files containing migrations.
33
33
*`-c [string] [string] or --connectionStrings [string] [string]` - [required] List of connection strings to which migrations will be applied
34
-
*`-s [string] or --strategy [string]` - [default = MigrationResolverAttribute] Select strategy for read migrations.
34
+
*`-s [string] or --strategy [string]` - [default = CSharpClasses] Select strategy for read migrations.
35
35
*`-g [string] or --group [string]` - If you specify some group or groups (separated by commas), migrations will be filtered by these groups
36
36
*`-t [string] or --tablename [string]` - You can change the name of the table in which the migrations will be stored.
37
37
@@ -41,7 +41,7 @@ For check available options use command `force-revert --help`.
41
41
*`-m [number] or --migration [number]` - [required] The parameter specifies the number of the migration which will be reverted (if it was applied before) and after it applied once again
42
42
*`-f [file] [file] or --files [file] [file]` - [required] List of files containing migrations.
43
43
*`-c [string] [string] or --connectionStrings [string] [string]` - [required] List of connection strings to which migrations will be applied.
44
-
*`-s [string] or --strategy [string]` - [default = MigrationResolverAttribute] Select strategy for read migrations.
44
+
*`-s [string] or --strategy [string]` - [default = CSharpClasses] Select strategy for read migrations.
45
45
*`-g [string] or --group [string]` - If you specify some group or groups (separated by commas), migrations will be filtered by these groups
46
46
*`-t [string] or --tablename [string]` - You can change the name of the table in which the migrations will be stored.
47
47
@@ -50,14 +50,17 @@ For check available options use command `force-revert --help`.
50
50
51
51
*`-m [number] or --migrationnumber [number]` - [required] Migration number for the new migration file(s)
52
52
*`-p [file] or --parameters [string]=[string] [string]=[string]` - [required] List of parameters.
53
-
*`-s [string] or --strategy [string]` - [default = MigrationResolverAttribute] Select strategy for read migrations.
53
+
*`-s [string] or --strategy [string]` - [default = CSharpClasses] Select strategy for generate migrations.
54
+
*`-g [string] or --group [string]` - Adding group to new migration.
55
+
*`-i [string] or --issue [string]` - Adding issue to new migration.
56
+
*`-d [string] or --description [string]` - You can specify description for new migration.
54
57
55
58
### revert-all
56
59
For check available options use command `force-revert --help`.
57
60
58
61
*`-f [file] [file] or --files [file] [file]` - [required] List of files containing migrations.
59
62
*`-c [string] [string] or --connectionStrings [string] [string]` - [required] List of connection strings to which migrations will be applied.
60
-
*`-s [string] or --strategy [string]` - [default = MigrationResolverAttribute] Select strategy for read migrations.
63
+
*`-s [string] or --strategy [string]` - [default = CSharpClasses] Select strategy for read migrations.
61
64
*`-g [string] or --group [string]` - If you specify some group or groups (separated by commas), migrations will be filtered by these groups
62
65
*`-t [string] or --tablename [string]` - You can change the name of the table in which the migrations will be stored.
63
66
@@ -83,6 +86,9 @@ For check available options use command `add-migration-profile --help`.
83
86
84
87
*`-m [number] or --migrationnumber [number]` - [required] Migration number for the new migration file(s)
85
88
*`-p [file] or --profile [file]` - Path to file contains profile (check `Profile file` section below).
89
+
*`-g [string] or --group [string]` - Adding group to new migration.
90
+
*`-i [string] or --issue [string]` - Adding issue to new migration.
91
+
*`-d [string] or --description [string]` - You can specify description for new migration.
86
92
87
93
### revert-all-profile
88
94
For check available options use command `revert-all-profile --help`.
@@ -91,7 +97,7 @@ For check available options use command `revert-all-profile --help`.
91
97
92
98
## Strategies
93
99
94
-
### MigrationResolverAttribute
100
+
### CSharpClasses
95
101
Migrations are organized into C# classes.
96
102
Each class inherits from the `MigrationScript` class from the `PostgreSQL.Migrations` assembly and decorated `MigrationNumber` attribute.
97
103
You must implement the `Up` and `Down` methods, where `Up` returns the SQL script that will be executed during the `Apply operation`, and `Down` returns the SQL script that will be executed during the `Revert operation`.
0 commit comments