Skip to content

Commit 9fc4fd1

Browse files
committed
> Fixed deploy script
* Refresh documentation
1 parent 67e646f commit 9fc4fd1

3 files changed

Lines changed: 25 additions & 16 deletions

File tree

docs/console.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ For check available options use command `apply --help`.
2121

2222
* `-f [file] [file] or --files [file] [file]` - [required] List of files containing migrations.
2323
* `-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.
2525
* `-g [string] or --group [string]` - If you specify some group or groups (separated by commas), migrations will be filtered by these groups
2626
* `-t [string] or --tablename [string]` - You can change the name of the table in which the migrations will be stored.
2727

@@ -31,7 +31,7 @@ For check available options use command `revert --help`.
3131
* `-m [number] or --migration [number]` - [required] The parameter specifies the number of the migration to which you want to roll back the changes
3232
* `-f [file] [file] or --files [file] [file]` - [required] List of files containing migrations.
3333
* `-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.
3535
* `-g [string] or --group [string]` - If you specify some group or groups (separated by commas), migrations will be filtered by these groups
3636
* `-t [string] or --tablename [string]` - You can change the name of the table in which the migrations will be stored.
3737

@@ -41,7 +41,7 @@ For check available options use command `force-revert --help`.
4141
* `-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
4242
* `-f [file] [file] or --files [file] [file]` - [required] List of files containing migrations.
4343
* `-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.
4545
* `-g [string] or --group [string]` - If you specify some group or groups (separated by commas), migrations will be filtered by these groups
4646
* `-t [string] or --tablename [string]` - You can change the name of the table in which the migrations will be stored.
4747

@@ -50,14 +50,17 @@ For check available options use command `force-revert --help`.
5050

5151
* `-m [number] or --migrationnumber [number]` - [required] Migration number for the new migration file(s)
5252
* `-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.
5457

5558
### revert-all
5659
For check available options use command `force-revert --help`.
5760

5861
* `-f [file] [file] or --files [file] [file]` - [required] List of files containing migrations.
5962
* `-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.
6164
* `-g [string] or --group [string]` - If you specify some group or groups (separated by commas), migrations will be filtered by these groups
6265
* `-t [string] or --tablename [string]` - You can change the name of the table in which the migrations will be stored.
6366

@@ -83,6 +86,9 @@ For check available options use command `add-migration-profile --help`.
8386

8487
* `-m [number] or --migrationnumber [number]` - [required] Migration number for the new migration file(s)
8588
* `-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.
8692

8793
### revert-all-profile
8894
For check available options use command `revert-all-profile --help`.
@@ -91,7 +97,7 @@ For check available options use command `revert-all-profile --help`.
9197

9298
## Strategies
9399

94-
### MigrationResolverAttribute
100+
### CSharpClasses
95101
Migrations are organized into C# classes.
96102
Each class inherits from the `MigrationScript` class from the `PostgreSQL.Migrations` assembly and decorated `MigrationNumber` attribute.
97103
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`.
@@ -127,7 +133,7 @@ constring Host=localhost;Port=5432;Username=postgres;Password=postgres;Database=
127133
constring Host=localhost;Port=5432;Username=postgres;Password=postgres;Database=seconddatabase
128134
file ~/project1/Migrations1.dll
129135
file ~/project2/Migrations2.dll
130-
strategy MigrationResolverAttribute
136+
strategy CSharpClasses
131137
group ProductionMigrations
132138
```
133139

src/PostgreSQL.Migrations.Console/Options/AddMigrationProfileOptions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ public record AddMigrationProfileOptions : AddMigrationProfileAdjustments {
1414
[Option ( 'i', "issue", HelpText = "You can specify issue for new migration." )]
1515
public string Issue { get; set; } = "";
1616

17+
[Option ( 'd', "description", HelpText = "You can specify description for new migration." )]
18+
public string Description { get; set; } = "";
19+
1720
}
1821

1922
}
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
& "dotnet" publish -c Release -r win-x86 -p:PublishSingleFile=true --self-contained true
2-
Compress-Archive -Path bin\Release\net7.0\win-x86\publish\PostgreSQL.Migrations.Console.exe -DestinationPath win-x86.zip
2+
Compress-Archive -Path bin\Release\net7.0\win-x86\publish\dbmigrations.exe -DestinationPath win-x86.zip
33
& "dotnet" publish -c Release -r win-x64 -p:PublishSingleFile=true --self-contained true
4-
Compress-Archive -Path bin\Release\net7.0\win-x64\publish\PostgreSQL.Migrations.Console.exe -DestinationPath win-x64.zip
4+
Compress-Archive -Path bin\Release\net7.0\win-x64\publish\dbmigrations.exe -DestinationPath win-x64.zip
55
& "dotnet" publish -c Release -r win-arm -p:PublishSingleFile=true --self-contained true
6-
Compress-Archive -Path bin\Release\net7.0\win-arm\publish\PostgreSQL.Migrations.Console.exe -DestinationPath win-arm.zip
6+
Compress-Archive -Path bin\Release\net7.0\win-arm\publish\dbmigrations.exe -DestinationPath win-arm.zip
77
& "dotnet" publish -c Release -r win-arm64 -p:PublishSingleFile=true --self-contained true
8-
Compress-Archive -Path bin\Release\net7.0\win-arm64\publish\PostgreSQL.Migrations.Console.exe -DestinationPath win-arm64.zip
8+
Compress-Archive -Path bin\Release\net7.0\win-arm64\publish\dbmigrations.exe -DestinationPath win-arm64.zip
99
& "dotnet" publish -c Release -r osx-x64 -p:PublishSingleFile=true --self-contained true
10-
Compress-Archive -Path bin\Release\net7.0\osx-x64\publish\PostgreSQL.Migrations.Console -DestinationPath osx-x64.zip
10+
Compress-Archive -Path bin\Release\net7.0\osx-x64\publish\dbmigrations -DestinationPath osx-x64.zip
1111
& "dotnet" publish -c Release -r osx-arm64 -p:PublishSingleFile=true --self-contained true
12-
Compress-Archive -Path bin\Release\net7.0\osx-arm64\publish\PostgreSQL.Migrations.Console -DestinationPath osx-arm64.zip
12+
Compress-Archive -Path bin\Release\net7.0\osx-arm64\publish\dbmigrations -DestinationPath osx-arm64.zip
1313
& "dotnet" publish -c Release -r linux-x64 -p:PublishSingleFile=true --self-contained true
14-
Compress-Archive -Path bin\Release\net7.0\linux-x64\publish\PostgreSQL.Migrations.Console -DestinationPath linux-x64.zip
14+
Compress-Archive -Path bin\Release\net7.0\linux-x64\publish\dbmigrations -DestinationPath linux-x64.zip
1515
& "dotnet" publish -c Release -r linux-arm -p:PublishSingleFile=true --self-contained true
16-
Compress-Archive -Path bin\Release\net7.0\linux-arm\publish\PostgreSQL.Migrations.Console -DestinationPath linux-arm.zip
16+
Compress-Archive -Path bin\Release\net7.0\linux-arm\publish\dbmigrations -DestinationPath linux-arm.zip
1717
& "dotnet" publish -c Release -r linux-arm64 -p:PublishSingleFile=true --self-contained true
18-
Compress-Archive -Path bin\Release\net7.0\linux-arm64\publish\PostgreSQL.Migrations.Console -DestinationPath linux-arm64.zip
18+
Compress-Archive -Path bin\Release\net7.0\linux-arm64\publish\dbmigrations -DestinationPath linux-arm64.zip

0 commit comments

Comments
 (0)