generated from kzi-nastava/dotnet-wpf-starter-template
-
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.
Merge pull request #270 from kzi-nastava/develop
KT4
- Loading branch information
Showing
17 changed files
with
1,032 additions
and
129 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
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 was deleted.
Oops, something went wrong.
92 changes: 71 additions & 21 deletions
92
...igrations/20240613193348_Mig1.Designer.cs → ...s/20240616173831_MigMapaFresh.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,102 @@ | ||
using System; | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace LangLang.Migrations | ||
{ | ||
public partial class MigMapaFresh : Migration | ||
{ | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.CreateTable( | ||
name: "Languages", | ||
columns: table => new | ||
{ | ||
Name = table.Column<string>(type: "text", nullable: false), | ||
Code = table.Column<string>(type: "text", nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Languages", x => x.Name); | ||
}); | ||
|
||
migrationBuilder.CreateTable( | ||
name: "Courses", | ||
columns: table => new | ||
{ | ||
Id = table.Column<string>(type: "text", nullable: false), | ||
Name = table.Column<string>(type: "text", nullable: false), | ||
LanguageName = table.Column<string>(type: "text", nullable: false), | ||
Level = table.Column<int>(type: "integer", nullable: false), | ||
Duration = table.Column<int>(type: "integer", nullable: false), | ||
Schedule = table.Column<string>(type: "text", nullable: false), | ||
ScheduleSerialized = table.Column<string>(type: "text", nullable: false), | ||
Start = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), | ||
Online = table.Column<bool>(type: "boolean", nullable: false), | ||
MaxStudents = table.Column<int>(type: "integer", nullable: false), | ||
NumStudents = table.Column<int>(type: "integer", nullable: false), | ||
State = table.Column<int>(type: "integer", nullable: false), | ||
TutorId = table.Column<string>(type: "text", nullable: true), | ||
IsCreatedByTutor = table.Column<bool>(type: "boolean", nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Courses", x => x.Id); | ||
table.ForeignKey( | ||
name: "FK_Courses_Languages_LanguageName", | ||
column: x => x.LanguageName, | ||
principalTable: "Languages", | ||
principalColumn: "Name", | ||
onDelete: ReferentialAction.Cascade); | ||
}); | ||
|
||
migrationBuilder.CreateTable( | ||
name: "Exams", | ||
columns: table => new | ||
{ | ||
Id = table.Column<string>(type: "text", nullable: false), | ||
LanguageName = table.Column<string>(type: "text", nullable: false), | ||
LanguageLevel = table.Column<int>(type: "integer", nullable: false), | ||
Time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false), | ||
ClassroomNumber = table.Column<int>(type: "integer", nullable: false), | ||
MaxStudents = table.Column<int>(type: "integer", nullable: false), | ||
NumStudents = table.Column<int>(type: "integer", nullable: false), | ||
ExamState = table.Column<int>(type: "integer", nullable: false), | ||
TutorId = table.Column<string>(type: "text", nullable: true) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Exams", x => x.Id); | ||
table.ForeignKey( | ||
name: "FK_Exams_Languages_LanguageName", | ||
column: x => x.LanguageName, | ||
principalTable: "Languages", | ||
principalColumn: "Name", | ||
onDelete: ReferentialAction.Cascade); | ||
}); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Courses_LanguageName", | ||
table: "Courses", | ||
column: "LanguageName"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Exams_LanguageName", | ||
table: "Exams", | ||
column: "LanguageName"); | ||
} | ||
|
||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropTable( | ||
name: "Courses"); | ||
|
||
migrationBuilder.DropTable( | ||
name: "Exams"); | ||
|
||
migrationBuilder.DropTable( | ||
name: "Languages"); | ||
} | ||
} | ||
} |
Oops, something went wrong.