-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
934 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
147 changes: 147 additions & 0 deletions
147
Benchmarks.Core/Database/Postgres/Migrations/20240317084132_CurrentPostgres.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
109 changes: 109 additions & 0 deletions
109
Benchmarks.Core/Database/Postgres/Migrations/20240317084132_CurrentPostgres.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; | ||
using System; | ||
|
||
#nullable disable | ||
|
||
namespace Benchmarks.Core.Database.Postgres.Migrations | ||
{ | ||
/// <inheritdoc /> | ||
public partial class CurrentPostgres : Migration | ||
{ | ||
/// <inheritdoc /> | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.CreateTable( | ||
name: "ClusteredIndexes", | ||
columns: table => new | ||
{ | ||
Id = table.Column<Guid>(type: "uuid", nullable: false), | ||
Text = table.Column<string>(type: "text", nullable: false), | ||
CreatedAtUtc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false), | ||
LongInteger = table.Column<long>(type: "bigint", nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_ClusteredIndexes", x => x.Id); | ||
}); | ||
|
||
migrationBuilder.CreateTable( | ||
name: "GuidPrimaryKeys", | ||
columns: table => new | ||
{ | ||
Id = table.Column<Guid>(type: "uuid", nullable: false), | ||
Text = table.Column<string>(type: "text", nullable: false), | ||
CreatedAtUtc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false), | ||
LongInteger = table.Column<long>(type: "bigint", nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_GuidPrimaryKeys", x => x.Id); | ||
}); | ||
|
||
migrationBuilder.CreateTable( | ||
name: "HardDeletes", | ||
columns: table => new | ||
{ | ||
Id = table.Column<long>(type: "bigint", nullable: false) | ||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), | ||
Text = table.Column<string>(type: "text", nullable: false), | ||
CreatedAtUtc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false), | ||
LongInteger = table.Column<long>(type: "bigint", nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_HardDeletes", x => x.Id); | ||
}); | ||
|
||
migrationBuilder.CreateTable( | ||
name: "NonClusteredIndexes", | ||
columns: table => new | ||
{ | ||
Id = table.Column<Guid>(type: "uuid", nullable: false), | ||
Text = table.Column<string>(type: "text", nullable: false), | ||
CreatedAtUtc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false), | ||
LongInteger = table.Column<long>(type: "bigint", nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_NonClusteredIndexes", x => x.Id); | ||
}); | ||
|
||
migrationBuilder.CreateTable( | ||
name: "SoftDeletes", | ||
columns: table => new | ||
{ | ||
Id = table.Column<long>(type: "bigint", nullable: false) | ||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), | ||
IsDeleted = table.Column<bool>(type: "boolean", nullable: false), | ||
DeletedAtUtc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true), | ||
Text = table.Column<string>(type: "text", nullable: false), | ||
CreatedAtUtc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false), | ||
LongInteger = table.Column<long>(type: "bigint", nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_SoftDeletes", x => x.Id); | ||
}); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropTable( | ||
name: "ClusteredIndexes"); | ||
|
||
migrationBuilder.DropTable( | ||
name: "GuidPrimaryKeys"); | ||
|
||
migrationBuilder.DropTable( | ||
name: "HardDeletes"); | ||
|
||
migrationBuilder.DropTable( | ||
name: "NonClusteredIndexes"); | ||
|
||
migrationBuilder.DropTable( | ||
name: "SoftDeletes"); | ||
} | ||
} | ||
} |
Oops, something went wrong.