-
Notifications
You must be signed in to change notification settings - Fork 2
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
6 changed files
with
297 additions
and
7 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
106 changes: 106 additions & 0 deletions
106
AdLerBackend.Infrastructure/Migrations/20241125115430_Initial.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
82 changes: 82 additions & 0 deletions
82
AdLerBackend.Infrastructure/Migrations/20241125115430_Initial.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,82 @@ | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace AdLerBackend.Infrastructure.Migrations | ||
{ | ||
/// <inheritdoc /> | ||
public partial class Initial : Migration | ||
{ | ||
/// <inheritdoc /> | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.CreateTable( | ||
name: "PlayerData", | ||
columns: table => new | ||
{ | ||
Id = table.Column<int>(type: "INTEGER", nullable: false), | ||
PlayerGender = table.Column<int>(type: "INTEGER", nullable: false), | ||
PlayerWorldColor = table.Column<int>(type: "INTEGER", nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_PlayerData", x => x.Id); | ||
}); | ||
|
||
migrationBuilder.CreateTable( | ||
name: "Worlds", | ||
columns: table => new | ||
{ | ||
Id = table.Column<int>(type: "INTEGER", nullable: false) | ||
.Annotation("Sqlite:Autoincrement", true), | ||
Name = table.Column<string>(type: "TEXT", nullable: false), | ||
LmsWorldId = table.Column<int>(type: "INTEGER", nullable: false), | ||
AuthorId = table.Column<int>(type: "INTEGER", nullable: false), | ||
AtfJson = table.Column<string>(type: "TEXT", nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Worlds", x => x.Id); | ||
}); | ||
|
||
migrationBuilder.CreateTable( | ||
name: "H5PLocationEntity", | ||
columns: table => new | ||
{ | ||
Id = table.Column<int>(type: "INTEGER", nullable: false) | ||
.Annotation("Sqlite:Autoincrement", true), | ||
Path = table.Column<string>(type: "TEXT", nullable: false), | ||
ElementId = table.Column<int>(type: "INTEGER", nullable: true), | ||
WorldEntityId = table.Column<int>(type: "INTEGER", nullable: true) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_H5PLocationEntity", x => x.Id); | ||
table.ForeignKey( | ||
name: "FK_H5PLocationEntity_Worlds_WorldEntityId", | ||
column: x => x.WorldEntityId, | ||
principalTable: "Worlds", | ||
principalColumn: "Id", | ||
onDelete: ReferentialAction.Cascade); | ||
}); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_H5PLocationEntity_WorldEntityId", | ||
table: "H5PLocationEntity", | ||
column: "WorldEntityId"); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropTable( | ||
name: "H5PLocationEntity"); | ||
|
||
migrationBuilder.DropTable( | ||
name: "PlayerData"); | ||
|
||
migrationBuilder.DropTable( | ||
name: "Worlds"); | ||
} | ||
} | ||
} |
103 changes: 103 additions & 0 deletions
103
AdLerBackend.Infrastructure/Migrations/DevelopmentContextModelSnapshot.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,103 @@ | ||
// <auto-generated /> | ||
using System; | ||
using AdLerBackend.Infrastructure.Repositories; | ||
using Microsoft.EntityFrameworkCore; | ||
using Microsoft.EntityFrameworkCore.Infrastructure; | ||
using Microsoft.EntityFrameworkCore.Metadata; | ||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; | ||
|
||
#nullable disable | ||
|
||
namespace AdLerBackend.Infrastructure.Migrations | ||
{ | ||
[DbContext(typeof(DevelopmentContext))] | ||
partial class DevelopmentContextModelSnapshot : ModelSnapshot | ||
{ | ||
protected override void BuildModel(ModelBuilder modelBuilder) | ||
{ | ||
#pragma warning disable 612, 618 | ||
modelBuilder.HasAnnotation("ProductVersion", "8.0.10"); | ||
|
||
modelBuilder.Entity("AdLerBackend.Domain.Entities.H5PLocationEntity", b => | ||
{ | ||
b.Property<int?>("Id") | ||
.ValueGeneratedOnAdd() | ||
.HasColumnType("INTEGER") | ||
.HasAnnotation("SqlServer:IdentityIncrement", 1) | ||
.HasAnnotation("SqlServer:IdentitySeed", 1L) | ||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | ||
|
||
b.Property<int?>("ElementId") | ||
.HasColumnType("INTEGER"); | ||
|
||
b.Property<string>("Path") | ||
.IsRequired() | ||
.HasColumnType("TEXT"); | ||
|
||
b.Property<int?>("WorldEntityId") | ||
.HasColumnType("INTEGER"); | ||
|
||
b.HasKey("Id"); | ||
|
||
b.HasIndex("WorldEntityId"); | ||
|
||
b.ToTable("H5PLocationEntity"); | ||
}); | ||
|
||
modelBuilder.Entity("AdLerBackend.Domain.Entities.PlayerData.PlayerData", b => | ||
{ | ||
b.Property<int?>("Id") | ||
.HasColumnType("INTEGER"); | ||
|
||
b.Property<int>("PlayerGender") | ||
.HasColumnType("INTEGER"); | ||
|
||
b.Property<int>("PlayerWorldColor") | ||
.HasColumnType("INTEGER"); | ||
|
||
b.HasKey("Id"); | ||
|
||
b.ToTable("PlayerData"); | ||
}); | ||
|
||
modelBuilder.Entity("AdLerBackend.Domain.Entities.WorldEntity", b => | ||
{ | ||
b.Property<int?>("Id") | ||
.ValueGeneratedOnAdd() | ||
.HasColumnType("INTEGER"); | ||
|
||
b.Property<string>("AtfJson") | ||
.IsRequired() | ||
.HasColumnType("TEXT"); | ||
|
||
b.Property<int>("AuthorId") | ||
.HasColumnType("INTEGER"); | ||
|
||
b.Property<int>("LmsWorldId") | ||
.HasColumnType("INTEGER"); | ||
|
||
b.Property<string>("Name") | ||
.IsRequired() | ||
.HasColumnType("TEXT"); | ||
|
||
b.HasKey("Id"); | ||
|
||
b.ToTable("Worlds"); | ||
}); | ||
|
||
modelBuilder.Entity("AdLerBackend.Domain.Entities.H5PLocationEntity", b => | ||
{ | ||
b.HasOne("AdLerBackend.Domain.Entities.WorldEntity", null) | ||
.WithMany("H5PFilesInCourse") | ||
.HasForeignKey("WorldEntityId") | ||
.OnDelete(DeleteBehavior.Cascade); | ||
}); | ||
|
||
modelBuilder.Entity("AdLerBackend.Domain.Entities.WorldEntity", b => | ||
{ | ||
b.Navigation("H5PFilesInCourse"); | ||
}); | ||
#pragma warning restore 612, 618 | ||
} | ||
} | ||
} |
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