diff --git a/AS1024.GeoFeed/Migrations/20240108180753_DiskCacheMigration.Designer.cs b/AS1024.GeoFeed/Migrations/20240108180753_DiskCacheMigration.Designer.cs new file mode 100644 index 0000000..ae8e9c7 --- /dev/null +++ b/AS1024.GeoFeed/Migrations/20240108180753_DiskCacheMigration.Designer.cs @@ -0,0 +1,54 @@ +// +using System; +using AS1024.GeoFeed.GeoFeedLocalCache; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace AS1024.GeoFeed.Migrations +{ + [DbContext(typeof(GeoFeedCacheDbContext))] + [Migration("20240108180753_DiskCacheMigration")] + partial class DiskCacheMigration + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "8.0.0"); + + modelBuilder.Entity("AS1024.GeoFeed.GeoFeedLocalCache.GeoFeedCacheEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("GeolocCity") + .HasColumnType("TEXT"); + + b.Property("GeolocCountry") + .HasColumnType("TEXT"); + + b.Property("GeolocHasLocation") + .HasColumnType("INTEGER"); + + b.Property("GeolocPostalCode") + .HasColumnType("TEXT"); + + b.Property("GeolocRegion") + .HasColumnType("TEXT"); + + b.Property("Prefix") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.ToTable("GeoFeedCacheEntries"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/AS1024.GeoFeed/Migrations/20240108180753_DiskCacheMigration.cs b/AS1024.GeoFeed/Migrations/20240108180753_DiskCacheMigration.cs new file mode 100644 index 0000000..2a350f5 --- /dev/null +++ b/AS1024.GeoFeed/Migrations/20240108180753_DiskCacheMigration.cs @@ -0,0 +1,39 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace AS1024.GeoFeed.Migrations +{ + /// + public partial class DiskCacheMigration : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "GeoFeedCacheEntries", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + GeolocCity = table.Column(type: "TEXT", nullable: true), + GeolocCountry = table.Column(type: "TEXT", nullable: true), + GeolocHasLocation = table.Column(type: "INTEGER", nullable: true), + GeolocRegion = table.Column(type: "TEXT", nullable: true), + GeolocPostalCode = table.Column(type: "TEXT", nullable: true), + Prefix = table.Column(type: "TEXT", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_GeoFeedCacheEntries", x => x.Id); + }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "GeoFeedCacheEntries"); + } + } +} diff --git a/AS1024.GeoFeed/Migrations/GeoFeedCacheDbContextModelSnapshot.cs b/AS1024.GeoFeed/Migrations/GeoFeedCacheDbContextModelSnapshot.cs new file mode 100644 index 0000000..f01917f --- /dev/null +++ b/AS1024.GeoFeed/Migrations/GeoFeedCacheDbContextModelSnapshot.cs @@ -0,0 +1,51 @@ +// +using System; +using AS1024.GeoFeed.GeoFeedLocalCache; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace AS1024.GeoFeed.Migrations +{ + [DbContext(typeof(GeoFeedCacheDbContext))] + partial class GeoFeedCacheDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "8.0.0"); + + modelBuilder.Entity("AS1024.GeoFeed.GeoFeedLocalCache.GeoFeedCacheEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("GeolocCity") + .HasColumnType("TEXT"); + + b.Property("GeolocCountry") + .HasColumnType("TEXT"); + + b.Property("GeolocHasLocation") + .HasColumnType("INTEGER"); + + b.Property("GeolocPostalCode") + .HasColumnType("TEXT"); + + b.Property("GeolocRegion") + .HasColumnType("TEXT"); + + b.Property("Prefix") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.ToTable("GeoFeedCacheEntries"); + }); +#pragma warning restore 612, 618 + } + } +}