mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-09-12 20:42:29 +00:00
Fix broken merge and recreate migrations
This commit is contained in:
parent
41d2b5be7d
commit
4e63ba70e7
4 changed files with 11 additions and 4 deletions
|
@ -50,7 +50,7 @@ public static class MockHelper
|
||||||
return finalResult;
|
return finalResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static async Task<DbContextOptionsBuilder<DatabaseContext>> GetInMemoryDbOptions()
|
public static async Task<DbContextOptionsBuilder<DatabaseContext>> GetInMemoryDbOptions()
|
||||||
{
|
{
|
||||||
DbConnection connection = new SqliteConnection("DataSource=:memory:");
|
DbConnection connection = new SqliteConnection("DataSource=:memory:");
|
||||||
await connection.OpenAsync();
|
await connection.OpenAsync();
|
||||||
|
|
|
@ -9,9 +9,10 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
namespace ProjectLighthouse.Migrations
|
namespace ProjectLighthouse.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(DatabaseContext))]
|
[DbContext(typeof(DatabaseContext))]
|
||||||
[Migration("20230725013522_InitialActivity")]
|
[Migration("20240120214525_InitialActivity")]
|
||||||
public partial class InitialActivity : Migration
|
public partial class InitialActivity : Migration
|
||||||
{
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
|
@ -140,6 +141,7 @@ namespace ProjectLighthouse.Migrations
|
||||||
column: "UserId");
|
column: "UserId");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
|
@ -8,9 +8,10 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
namespace ProjectLighthouse.Migrations
|
namespace ProjectLighthouse.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(DatabaseContext))]
|
[DbContext(typeof(DatabaseContext))]
|
||||||
[Migration("20230814031609_AddPublishedAtToAnnouncements")]
|
[Migration("20240120214606_AddPublishedAtToWebAnnouncements")]
|
||||||
public partial class AddPublishedAtToAnnouncements : Migration
|
public partial class AddPublishedAtToWebAnnouncements : Migration
|
||||||
{
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
migrationBuilder.AddColumn<DateTime>(
|
migrationBuilder.AddColumn<DateTime>(
|
||||||
|
@ -21,6 +22,7 @@ namespace ProjectLighthouse.Migrations
|
||||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
migrationBuilder.DropColumn(
|
migrationBuilder.DropColumn(
|
|
@ -1107,6 +1107,9 @@ namespace ProjectLighthouse.Migrations
|
||||||
b.Property<string>("Content")
|
b.Property<string>("Content")
|
||||||
.HasColumnType("longtext");
|
.HasColumnType("longtext");
|
||||||
|
|
||||||
|
b.Property<DateTime>("PublishedAt")
|
||||||
|
.HasColumnType("datetime(6)");
|
||||||
|
|
||||||
b.Property<int?>("PublisherId")
|
b.Property<int?>("PublisherId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue