Bdd8 SQLite

master
Leni BEAULATON 2 weeks ago
parent d1f802a002
commit f125ebc9fd

File diff suppressed because it is too large Load Diff

@ -1,86 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
namespace StubbedContextLib.Migrations
{
/// <inheritdoc />
public partial class pm_apiV2 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_comments",
table: "comments");
migrationBuilder.DeleteData(
table: "comments",
keyColumns: new[] { "IdQuote", "IdUser" },
keyValues: new object[] { 1, 2 });
migrationBuilder.DeleteData(
table: "comments",
keyColumns: new[] { "IdQuote", "IdUser" },
keyValues: new object[] { 1, 3 });
migrationBuilder.AddPrimaryKey(
name: "PK_comments",
table: "comments",
column: "Id");
migrationBuilder.InsertData(
table: "comments",
columns: new[] { "Id", "Comment", "DateCommentary", "IdQuote", "IdUser" },
values: new object[,]
{
{ 1, "Ce film est le meilleur", new DateTime(2025, 2, 3, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, 2 },
{ 2, "Very good", new DateTime(2025, 3, 11, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, 3 }
});
migrationBuilder.CreateIndex(
name: "IX_comments_IdUser",
table: "comments",
column: "IdUser");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_comments",
table: "comments");
migrationBuilder.DropIndex(
name: "IX_comments_IdUser",
table: "comments");
migrationBuilder.DeleteData(
table: "comments",
keyColumn: "Id",
keyValue: 1);
migrationBuilder.DeleteData(
table: "comments",
keyColumn: "Id",
keyValue: 2);
migrationBuilder.AddPrimaryKey(
name: "PK_comments",
table: "comments",
columns: new[] { "IdUser", "IdQuote" });
migrationBuilder.InsertData(
table: "comments",
columns: new[] { "IdQuote", "IdUser", "Comment", "DateCommentary", "Id" },
values: new object[,]
{
{ 1, 2, "Ce film est le meilleur", new DateTime(2025, 2, 3, 0, 0, 0, 0, DateTimeKind.Unspecified), 1 },
{ 1, 3, "Very good", new DateTime(2025, 3, 11, 0, 0, 0, 0, DateTimeKind.Unspecified), 2 }
});
}
}
}

@ -2,7 +2,6 @@
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using StubbedContextLib;
@ -12,29 +11,23 @@ using StubbedContextLib;
namespace StubbedContextLib.Migrations
{
[DbContext(typeof(StubWTFContext))]
[Migration("20250402134601_pm_apiV2")]
partial class pm_apiV2
[Migration("20250403144039_myFirstMigration")]
partial class myFirstMigration
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "9.0.3")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.HasAnnotation("ProductVersion", "9.0.3");
modelBuilder.Entity("Entity.Admin", b =>
{
b.Property<int>("IdUsers")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdUsers"));
.HasColumnType("INTEGER");
b.Property<int>("UserId")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.HasKey("IdUsers");
@ -47,17 +40,15 @@ namespace StubbedContextLib.Migrations
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
.HasColumnType("INTEGER");
b.Property<int>("IdImage")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
.HasColumnType("TEXT");
b.HasKey("Id");
@ -132,24 +123,22 @@ namespace StubbedContextLib.Migrations
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
.HasColumnType("INTEGER");
b.Property<string>("Comment")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
.HasColumnType("TEXT");
b.Property<DateTime>("DateCommentary")
.HasColumnType("date")
.HasColumnName("DateCommentary");
b.Property<int>("IdQuote")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.Property<int>("IdUser")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.HasKey("Id");
@ -181,10 +170,10 @@ namespace StubbedContextLib.Migrations
modelBuilder.Entity("Entity.Favorite", b =>
{
b.Property<int>("IdQuote")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.Property<int>("IdUsers")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.HasKey("IdQuote", "IdUsers");
@ -244,13 +233,11 @@ namespace StubbedContextLib.Migrations
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
.HasColumnType("INTEGER");
b.Property<string>("ImgPath")
.IsRequired()
.HasColumnType("nvarchar(max)");
.HasColumnType("TEXT");
b.HasKey("Id");
@ -313,42 +300,40 @@ namespace StubbedContextLib.Migrations
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
.HasColumnType("INTEGER");
b.Property<string>("AnswerA")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
.HasColumnType("TEXT");
b.Property<string>("AnswerB")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
.HasColumnType("TEXT");
b.Property<string>("AnswerC")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
.HasColumnType("TEXT");
b.Property<string>("AnswerD")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
.HasColumnType("TEXT");
b.Property<string>("CorrectAnswer")
.IsRequired()
.HasMaxLength(1)
.HasColumnType("nvarchar(1)");
.HasColumnType("TEXT");
b.Property<bool>("IsValid")
.HasColumnType("bit");
.HasColumnType("INTEGER");
b.Property<string>("Text")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
.HasColumnType("TEXT");
b.HasKey("Id");
@ -471,20 +456,18 @@ namespace StubbedContextLib.Migrations
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
.HasColumnType("INTEGER");
b.Property<int>("IdImage")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.Property<int>("NbQuestion")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
.HasColumnType("TEXT");
b.HasKey("Id");
@ -512,10 +495,10 @@ namespace StubbedContextLib.Migrations
modelBuilder.Entity("Entity.QuizQuestion", b =>
{
b.Property<int>("IdQuestion")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.Property<int>("IdQuiz")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.HasKey("IdQuestion", "IdQuiz");
@ -580,32 +563,30 @@ namespace StubbedContextLib.Migrations
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
.HasColumnType("INTEGER");
b.Property<string>("Content")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
.HasColumnType("TEXT");
b.Property<int>("IdCharacter")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.Property<int>("IdSource")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.Property<int?>("IdUsersPropose")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.Property<bool>("IsValid")
.HasColumnType("bit");
.HasColumnType("INTEGER");
b.Property<int>("Langage")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.Property<int>("Likes")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.HasKey("Id");
@ -734,20 +715,18 @@ namespace StubbedContextLib.Migrations
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
.HasColumnType("INTEGER");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
.HasColumnType("TEXT");
b.Property<int>("TypeSrc")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.Property<int>("Year")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.HasKey("Id");
@ -795,9 +774,7 @@ namespace StubbedContextLib.Migrations
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
.HasColumnType("INTEGER");
b.Property<DateTime>("Created")
.HasColumnType("date")
@ -806,20 +783,20 @@ namespace StubbedContextLib.Migrations
b.Property<string>("Email")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
.HasColumnType("TEXT");
b.Property<int>("IdImage")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.Property<string>("Password")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
.HasColumnType("TEXT");
b.Property<string>("UserName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
.HasColumnType("TEXT");
b.HasKey("Id");

@ -8,7 +8,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
namespace StubbedContextLib.Migrations
{
/// <inheritdoc />
public partial class pm_api : Migration
public partial class myFirstMigration : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
@ -17,9 +17,9 @@ namespace StubbedContextLib.Migrations
name: "images",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ImgPath = table.Column<string>(type: "nvarchar(max)", nullable: false)
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
ImgPath = table.Column<string>(type: "TEXT", nullable: false)
},
constraints: table =>
{
@ -30,15 +30,15 @@ namespace StubbedContextLib.Migrations
name: "question",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Text = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
AnswerA = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
AnswerB = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
AnswerC = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
AnswerD = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
CorrectAnswer = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: false),
IsValid = table.Column<bool>(type: "bit", nullable: false)
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Text = table.Column<string>(type: "TEXT", maxLength: 200, nullable: false),
AnswerA = table.Column<string>(type: "TEXT", maxLength: 50, nullable: false),
AnswerB = table.Column<string>(type: "TEXT", maxLength: 50, nullable: false),
AnswerC = table.Column<string>(type: "TEXT", maxLength: 50, nullable: false),
AnswerD = table.Column<string>(type: "TEXT", maxLength: 50, nullable: false),
CorrectAnswer = table.Column<string>(type: "TEXT", maxLength: 1, nullable: false),
IsValid = table.Column<bool>(type: "INTEGER", nullable: false)
},
constraints: table =>
{
@ -49,11 +49,11 @@ namespace StubbedContextLib.Migrations
name: "sources",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Title = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
Year = table.Column<int>(type: "int", nullable: false),
TypeSrc = table.Column<int>(type: "int", nullable: false)
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Title = table.Column<string>(type: "TEXT", maxLength: 100, nullable: false),
Year = table.Column<int>(type: "INTEGER", nullable: false),
TypeSrc = table.Column<int>(type: "INTEGER", nullable: false)
},
constraints: table =>
{
@ -64,10 +64,10 @@ namespace StubbedContextLib.Migrations
name: "characters",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
IdImage = table.Column<int>(type: "int", nullable: false)
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Name = table.Column<string>(type: "TEXT", maxLength: 50, nullable: false),
IdImage = table.Column<int>(type: "INTEGER", nullable: false)
},
constraints: table =>
{
@ -84,11 +84,11 @@ namespace StubbedContextLib.Migrations
name: "quizzes",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Title = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
IdImage = table.Column<int>(type: "int", nullable: false),
NbQuestion = table.Column<int>(type: "int", nullable: false)
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Title = table.Column<string>(type: "TEXT", maxLength: 50, nullable: false),
IdImage = table.Column<int>(type: "INTEGER", nullable: false),
NbQuestion = table.Column<int>(type: "INTEGER", nullable: false)
},
constraints: table =>
{
@ -105,12 +105,12 @@ namespace StubbedContextLib.Migrations
name: "users",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
UserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
Email = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
Password = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
IdImage = table.Column<int>(type: "int", nullable: false),
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
UserName = table.Column<string>(type: "TEXT", maxLength: 50, nullable: false),
Email = table.Column<string>(type: "TEXT", maxLength: 50, nullable: false),
Password = table.Column<string>(type: "TEXT", maxLength: 200, nullable: false),
IdImage = table.Column<int>(type: "INTEGER", nullable: false),
Created = table.Column<DateTime>(type: "date", nullable: false)
},
constraints: table =>
@ -128,8 +128,8 @@ namespace StubbedContextLib.Migrations
name: "QuizQuestion",
columns: table => new
{
IdQuiz = table.Column<int>(type: "int", nullable: false),
IdQuestion = table.Column<int>(type: "int", nullable: false)
IdQuiz = table.Column<int>(type: "INTEGER", nullable: false),
IdQuestion = table.Column<int>(type: "INTEGER", nullable: false)
},
constraints: table =>
{
@ -152,9 +152,9 @@ namespace StubbedContextLib.Migrations
name: "admins",
columns: table => new
{
IdUsers = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
UserId = table.Column<int>(type: "int", nullable: false)
IdUsers = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
UserId = table.Column<int>(type: "INTEGER", nullable: false)
},
constraints: table =>
{
@ -171,15 +171,15 @@ namespace StubbedContextLib.Migrations
name: "quotes",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Content = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
Likes = table.Column<int>(type: "int", nullable: false),
Langage = table.Column<int>(type: "int", nullable: false),
IsValid = table.Column<bool>(type: "bit", nullable: false),
IdCharacter = table.Column<int>(type: "int", nullable: false),
IdSource = table.Column<int>(type: "int", nullable: false),
IdUsersPropose = table.Column<int>(type: "int", nullable: true)
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Content = table.Column<string>(type: "TEXT", maxLength: 100, nullable: false),
Likes = table.Column<int>(type: "INTEGER", nullable: false),
Langage = table.Column<int>(type: "INTEGER", nullable: false),
IsValid = table.Column<bool>(type: "INTEGER", nullable: false),
IdCharacter = table.Column<int>(type: "INTEGER", nullable: false),
IdSource = table.Column<int>(type: "INTEGER", nullable: false),
IdUsersPropose = table.Column<int>(type: "INTEGER", nullable: true)
},
constraints: table =>
{
@ -207,16 +207,16 @@ namespace StubbedContextLib.Migrations
name: "comments",
columns: table => new
{
IdUser = table.Column<int>(type: "int", nullable: false),
IdQuote = table.Column<int>(type: "int", nullable: false),
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
IdUser = table.Column<int>(type: "INTEGER", nullable: false),
IdQuote = table.Column<int>(type: "INTEGER", nullable: false),
DateCommentary = table.Column<DateTime>(type: "date", nullable: false),
Comment = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false)
Comment = table.Column<string>(type: "TEXT", maxLength: 100, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_comments", x => new { x.IdUser, x.IdQuote });
table.PrimaryKey("PK_comments", x => x.Id);
table.ForeignKey(
name: "FK_comments_quotes_IdQuote",
column: x => x.IdQuote,
@ -234,8 +234,8 @@ namespace StubbedContextLib.Migrations
name: "favorites",
columns: table => new
{
IdUsers = table.Column<int>(type: "int", nullable: false),
IdQuote = table.Column<int>(type: "int", nullable: false)
IdUsers = table.Column<int>(type: "INTEGER", nullable: false),
IdQuote = table.Column<int>(type: "INTEGER", nullable: false)
},
constraints: table =>
{
@ -377,11 +377,11 @@ namespace StubbedContextLib.Migrations
migrationBuilder.InsertData(
table: "comments",
columns: new[] { "IdQuote", "IdUser", "Comment", "DateCommentary", "Id" },
columns: new[] { "Id", "Comment", "DateCommentary", "IdQuote", "IdUser" },
values: new object[,]
{
{ 1, 2, "Ce film est le meilleur", new DateTime(2025, 2, 3, 0, 0, 0, 0, DateTimeKind.Unspecified), 1 },
{ 1, 3, "Very good", new DateTime(2025, 3, 11, 0, 0, 0, 0, DateTimeKind.Unspecified), 2 }
{ 1, "Ce film est le meilleur", new DateTime(2025, 2, 3, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, 2 },
{ 2, "Very good", new DateTime(2025, 3, 11, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, 3 }
});
migrationBuilder.InsertData(
@ -415,6 +415,11 @@ namespace StubbedContextLib.Migrations
table: "comments",
column: "IdQuote");
migrationBuilder.CreateIndex(
name: "IX_comments_IdUser",
table: "comments",
column: "IdUser");
migrationBuilder.CreateIndex(
name: "IX_favorites_IdUsers",
table: "favorites",

@ -2,7 +2,6 @@
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using StubbedContextLib;
@ -16,22 +15,16 @@ namespace StubbedContextLib.Migrations
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "9.0.3")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.HasAnnotation("ProductVersion", "9.0.3");
modelBuilder.Entity("Entity.Admin", b =>
{
b.Property<int>("IdUsers")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdUsers"));
.HasColumnType("INTEGER");
b.Property<int>("UserId")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.HasKey("IdUsers");
@ -44,17 +37,15 @@ namespace StubbedContextLib.Migrations
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
.HasColumnType("INTEGER");
b.Property<int>("IdImage")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
.HasColumnType("TEXT");
b.HasKey("Id");
@ -129,24 +120,22 @@ namespace StubbedContextLib.Migrations
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
.HasColumnType("INTEGER");
b.Property<string>("Comment")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
.HasColumnType("TEXT");
b.Property<DateTime>("DateCommentary")
.HasColumnType("date")
.HasColumnName("DateCommentary");
b.Property<int>("IdQuote")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.Property<int>("IdUser")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.HasKey("Id");
@ -178,10 +167,10 @@ namespace StubbedContextLib.Migrations
modelBuilder.Entity("Entity.Favorite", b =>
{
b.Property<int>("IdQuote")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.Property<int>("IdUsers")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.HasKey("IdQuote", "IdUsers");
@ -241,13 +230,11 @@ namespace StubbedContextLib.Migrations
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
.HasColumnType("INTEGER");
b.Property<string>("ImgPath")
.IsRequired()
.HasColumnType("nvarchar(max)");
.HasColumnType("TEXT");
b.HasKey("Id");
@ -310,42 +297,40 @@ namespace StubbedContextLib.Migrations
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
.HasColumnType("INTEGER");
b.Property<string>("AnswerA")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
.HasColumnType("TEXT");
b.Property<string>("AnswerB")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
.HasColumnType("TEXT");
b.Property<string>("AnswerC")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
.HasColumnType("TEXT");
b.Property<string>("AnswerD")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
.HasColumnType("TEXT");
b.Property<string>("CorrectAnswer")
.IsRequired()
.HasMaxLength(1)
.HasColumnType("nvarchar(1)");
.HasColumnType("TEXT");
b.Property<bool>("IsValid")
.HasColumnType("bit");
.HasColumnType("INTEGER");
b.Property<string>("Text")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
.HasColumnType("TEXT");
b.HasKey("Id");
@ -468,20 +453,18 @@ namespace StubbedContextLib.Migrations
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
.HasColumnType("INTEGER");
b.Property<int>("IdImage")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.Property<int>("NbQuestion")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
.HasColumnType("TEXT");
b.HasKey("Id");
@ -509,10 +492,10 @@ namespace StubbedContextLib.Migrations
modelBuilder.Entity("Entity.QuizQuestion", b =>
{
b.Property<int>("IdQuestion")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.Property<int>("IdQuiz")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.HasKey("IdQuestion", "IdQuiz");
@ -577,32 +560,30 @@ namespace StubbedContextLib.Migrations
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
.HasColumnType("INTEGER");
b.Property<string>("Content")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
.HasColumnType("TEXT");
b.Property<int>("IdCharacter")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.Property<int>("IdSource")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.Property<int?>("IdUsersPropose")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.Property<bool>("IsValid")
.HasColumnType("bit");
.HasColumnType("INTEGER");
b.Property<int>("Langage")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.Property<int>("Likes")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.HasKey("Id");
@ -731,20 +712,18 @@ namespace StubbedContextLib.Migrations
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
.HasColumnType("INTEGER");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
.HasColumnType("TEXT");
b.Property<int>("TypeSrc")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.Property<int>("Year")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.HasKey("Id");
@ -792,9 +771,7 @@ namespace StubbedContextLib.Migrations
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
.HasColumnType("INTEGER");
b.Property<DateTime>("Created")
.HasColumnType("date")
@ -803,20 +780,20 @@ namespace StubbedContextLib.Migrations
b.Property<string>("Email")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
.HasColumnType("TEXT");
b.Property<int>("IdImage")
.HasColumnType("int");
.HasColumnType("INTEGER");
b.Property<string>("Password")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
.HasColumnType("TEXT");
b.Property<string>("UserName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
.HasColumnType("TEXT");
b.HasKey("Id");

Loading…
Cancel
Save