summaryrefslogtreecommitdiffstats
path: root/BlobBin/Migrations
diff options
context:
space:
mode:
authorivarlovlie <git@ivarlovlie.no>2023-01-10 21:46:03 +0100
committerivarlovlie <git@ivarlovlie.no>2023-01-10 21:46:03 +0100
commita9860b28f2be123d1f0bfad504165992a4c841ed (patch)
tree12c0683e18cb1efd4dd202d0d011f5902df950c2 /BlobBin/Migrations
parent9d7152b5ca085c70e9b0d94adb6f5f9ff8d6f127 (diff)
downloadblob-bin-a9860b28f2be123d1f0bfad504165992a4c841ed.tar.xz
blob-bin-a9860b28f2be123d1f0bfad504165992a4c841ed.zip
feat: feat
Diffstat (limited to 'BlobBin/Migrations')
-rw-r--r--BlobBin/Migrations/20230110204008_InitialCreate.Designer.cs105
-rw-r--r--BlobBin/Migrations/20230110204008_InitialCreate.cs65
-rw-r--r--BlobBin/Migrations/DBModelSnapshot.cs102
3 files changed, 272 insertions, 0 deletions
diff --git a/BlobBin/Migrations/20230110204008_InitialCreate.Designer.cs b/BlobBin/Migrations/20230110204008_InitialCreate.Designer.cs
new file mode 100644
index 0000000..f461df5
--- /dev/null
+++ b/BlobBin/Migrations/20230110204008_InitialCreate.Designer.cs
@@ -0,0 +1,105 @@
+// <auto-generated />
+using System;
+using BlobBin;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace BlobBin.Migrations
+{
+ [DbContext(typeof(DB))]
+ [Migration("20230110204008_InitialCreate")]
+ partial class InitialCreate
+ {
+ /// <inheritdoc />
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder.HasAnnotation("ProductVersion", "7.0.2");
+
+ modelBuilder.Entity("BlobBin.File", b =>
+ {
+ b.Property<Guid>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property<string>("AutoDeleteAfter")
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime>("CreatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("CreatedBy")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime?>("DeletedAt")
+ .HasColumnType("TEXT");
+
+ b.Property<long>("Length")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("MimeType")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Name")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property<string>("PasswordHash")
+ .HasColumnType("TEXT");
+
+ b.Property<bool>("Singleton")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.ToTable("Files");
+ });
+
+ modelBuilder.Entity("BlobBin.Paste", b =>
+ {
+ b.Property<Guid>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property<string>("AutoDeleteAfter")
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime>("CreatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("CreatedBy")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime?>("DeletedAt")
+ .HasColumnType("TEXT");
+
+ b.Property<long>("Length")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("MimeType")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Name")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property<string>("PasswordHash")
+ .HasColumnType("TEXT");
+
+ b.Property<bool>("Singleton")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.ToTable("Pastes");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/BlobBin/Migrations/20230110204008_InitialCreate.cs b/BlobBin/Migrations/20230110204008_InitialCreate.cs
new file mode 100644
index 0000000..1614b01
--- /dev/null
+++ b/BlobBin/Migrations/20230110204008_InitialCreate.cs
@@ -0,0 +1,65 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace BlobBin.Migrations
+{
+ /// <inheritdoc />
+ public partial class InitialCreate : Migration
+ {
+ /// <inheritdoc />
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.CreateTable(
+ name: "Files",
+ columns: table => new
+ {
+ Id = table.Column<Guid>(type: "TEXT", nullable: false),
+ Name = table.Column<string>(type: "TEXT", nullable: false),
+ Length = table.Column<long>(type: "INTEGER", nullable: false),
+ CreatedAt = table.Column<DateTime>(type: "TEXT", nullable: false),
+ CreatedBy = table.Column<string>(type: "TEXT", nullable: false),
+ DeletedAt = table.Column<DateTime>(type: "TEXT", nullable: true),
+ PasswordHash = table.Column<string>(type: "TEXT", nullable: true),
+ Singleton = table.Column<bool>(type: "INTEGER", nullable: false),
+ AutoDeleteAfter = table.Column<string>(type: "TEXT", nullable: true),
+ MimeType = table.Column<string>(type: "TEXT", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Files", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "Pastes",
+ columns: table => new
+ {
+ Id = table.Column<Guid>(type: "TEXT", nullable: false),
+ Name = table.Column<string>(type: "TEXT", nullable: false),
+ Length = table.Column<long>(type: "INTEGER", nullable: false),
+ CreatedAt = table.Column<DateTime>(type: "TEXT", nullable: false),
+ CreatedBy = table.Column<string>(type: "TEXT", nullable: false),
+ DeletedAt = table.Column<DateTime>(type: "TEXT", nullable: true),
+ PasswordHash = table.Column<string>(type: "TEXT", nullable: true),
+ Singleton = table.Column<bool>(type: "INTEGER", nullable: false),
+ AutoDeleteAfter = table.Column<string>(type: "TEXT", nullable: true),
+ MimeType = table.Column<string>(type: "TEXT", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Pastes", x => x.Id);
+ });
+ }
+
+ /// <inheritdoc />
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "Files");
+
+ migrationBuilder.DropTable(
+ name: "Pastes");
+ }
+ }
+}
diff --git a/BlobBin/Migrations/DBModelSnapshot.cs b/BlobBin/Migrations/DBModelSnapshot.cs
new file mode 100644
index 0000000..b81feae
--- /dev/null
+++ b/BlobBin/Migrations/DBModelSnapshot.cs
@@ -0,0 +1,102 @@
+// <auto-generated />
+using System;
+using BlobBin;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace BlobBin.Migrations
+{
+ [DbContext(typeof(DB))]
+ partial class DBModelSnapshot : ModelSnapshot
+ {
+ protected override void BuildModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder.HasAnnotation("ProductVersion", "7.0.2");
+
+ modelBuilder.Entity("BlobBin.File", b =>
+ {
+ b.Property<Guid>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property<string>("AutoDeleteAfter")
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime>("CreatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("CreatedBy")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime?>("DeletedAt")
+ .HasColumnType("TEXT");
+
+ b.Property<long>("Length")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("MimeType")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Name")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property<string>("PasswordHash")
+ .HasColumnType("TEXT");
+
+ b.Property<bool>("Singleton")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.ToTable("Files");
+ });
+
+ modelBuilder.Entity("BlobBin.Paste", b =>
+ {
+ b.Property<Guid>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property<string>("AutoDeleteAfter")
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime>("CreatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("CreatedBy")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime?>("DeletedAt")
+ .HasColumnType("TEXT");
+
+ b.Property<long>("Length")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("MimeType")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Name")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property<string>("PasswordHash")
+ .HasColumnType("TEXT");
+
+ b.Property<bool>("Singleton")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.ToTable("Pastes");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}