diff --git a/I18N Commander/DataModel/Migrations/20220612151133_202206AddSettings.Designer.cs b/I18N Commander/DataModel/Migrations/20220612151133_202206AddSettings.Designer.cs new file mode 100644 index 0000000..50afbab --- /dev/null +++ b/I18N Commander/DataModel/Migrations/20220612151133_202206AddSettings.Designer.cs @@ -0,0 +1,65 @@ +// +using System; +using DataModel.Database.Common; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace DataModel.Migrations +{ + [DbContext(typeof(DataContext))] + [Migration("20220612151133_202206AddSettings")] + partial class _202206AddSettings + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "6.0.5"); + + modelBuilder.Entity("DataModel.Database.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("BoolValue") + .HasColumnType("INTEGER"); + + b.Property("GuidValue") + .HasColumnType("TEXT"); + + b.Property("IntegerValue") + .HasColumnType("INTEGER"); + + b.Property("Name") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("TextValue") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("BoolValue"); + + b.HasIndex("GuidValue"); + + b.HasIndex("Id"); + + b.HasIndex("IntegerValue"); + + b.HasIndex("Name") + .IsUnique(); + + b.HasIndex("TextValue"); + + b.ToTable("Settings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/I18N Commander/DataModel/Migrations/20220612151133_202206AddSettings.cs b/I18N Commander/DataModel/Migrations/20220612151133_202206AddSettings.cs new file mode 100644 index 0000000..22de1af --- /dev/null +++ b/I18N Commander/DataModel/Migrations/20220612151133_202206AddSettings.cs @@ -0,0 +1,67 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace DataModel.Migrations +{ + public partial class _202206AddSettings : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "Settings", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + Name = table.Column(type: "TEXT", nullable: false), + TextValue = table.Column(type: "TEXT", nullable: false), + BoolValue = table.Column(type: "INTEGER", nullable: false), + IntegerValue = table.Column(type: "INTEGER", nullable: false), + GuidValue = table.Column(type: "TEXT", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Settings", x => x.Id); + }); + + migrationBuilder.CreateIndex( + name: "IX_Settings_BoolValue", + table: "Settings", + column: "BoolValue"); + + migrationBuilder.CreateIndex( + name: "IX_Settings_GuidValue", + table: "Settings", + column: "GuidValue"); + + migrationBuilder.CreateIndex( + name: "IX_Settings_Id", + table: "Settings", + column: "Id"); + + migrationBuilder.CreateIndex( + name: "IX_Settings_IntegerValue", + table: "Settings", + column: "IntegerValue"); + + migrationBuilder.CreateIndex( + name: "IX_Settings_Name", + table: "Settings", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Settings_TextValue", + table: "Settings", + column: "TextValue"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "Settings"); + } + } +} diff --git a/I18N Commander/DataModel/Migrations/DataContextModelSnapshot.cs b/I18N Commander/DataModel/Migrations/DataContextModelSnapshot.cs new file mode 100644 index 0000000..4bfc41b --- /dev/null +++ b/I18N Commander/DataModel/Migrations/DataContextModelSnapshot.cs @@ -0,0 +1,63 @@ +// +using System; +using DataModel.Database.Common; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace DataModel.Migrations +{ + [DbContext(typeof(DataContext))] + partial class DataContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "6.0.5"); + + modelBuilder.Entity("DataModel.Database.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("BoolValue") + .HasColumnType("INTEGER"); + + b.Property("GuidValue") + .HasColumnType("TEXT"); + + b.Property("IntegerValue") + .HasColumnType("INTEGER"); + + b.Property("Name") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("TextValue") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("BoolValue"); + + b.HasIndex("GuidValue"); + + b.HasIndex("Id"); + + b.HasIndex("IntegerValue"); + + b.HasIndex("Name") + .IsUnique(); + + b.HasIndex("TextValue"); + + b.ToTable("Settings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/project for migrations.i18nc b/project for migrations.i18nc new file mode 100644 index 0000000..e69de29