mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-09-12 12:32: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;
|
||||
}
|
||||
|
||||
private static async Task<DbContextOptionsBuilder<DatabaseContext>> GetInMemoryDbOptions()
|
||||
public static async Task<DbContextOptionsBuilder<DatabaseContext>> GetInMemoryDbOptions()
|
||||
{
|
||||
DbConnection connection = new SqliteConnection("DataSource=:memory:");
|
||||
await connection.OpenAsync();
|
||||
|
|
|
@ -9,9 +9,10 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
|||
namespace ProjectLighthouse.Migrations
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[Migration("20230725013522_InitialActivity")]
|
||||
[Migration("20240120214525_InitialActivity")]
|
||||
public partial class InitialActivity : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
|
@ -140,6 +141,7 @@ namespace ProjectLighthouse.Migrations
|
|||
column: "UserId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
|
@ -8,9 +8,10 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
|||
namespace ProjectLighthouse.Migrations
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[Migration("20230814031609_AddPublishedAtToAnnouncements")]
|
||||
public partial class AddPublishedAtToAnnouncements : Migration
|
||||
[Migration("20240120214606_AddPublishedAtToWebAnnouncements")]
|
||||
public partial class AddPublishedAtToWebAnnouncements : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
|
@ -21,6 +22,7 @@ namespace ProjectLighthouse.Migrations
|
|||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
|
@ -1107,6 +1107,9 @@ namespace ProjectLighthouse.Migrations
|
|||
b.Property<string>("Content")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<DateTime>("PublishedAt")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int?>("PublisherId")
|
||||
.HasColumnType("int");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue