summaryrefslogtreecommitdiffstats
path: root/src/Migrations
diff options
context:
space:
mode:
authorivarlovlie <git@ivarlovlie.no>2023-01-13 20:21:20 +0100
committerivarlovlie <git@ivarlovlie.no>2023-01-13 20:21:20 +0100
commit0ae5a68a9d81547bb9b741458d94b5f1b7374027 (patch)
tree485384d892cdfe4dc6af79f3cf0abe11d2e552b1 /src/Migrations
parent971c00b8f5977db9422eeafa47b262c1030bd4af (diff)
downloadblob-bin-0ae5a68a9d81547bb9b741458d94b5f1b7374027.tar.xz
blob-bin-0ae5a68a9d81547bb9b741458d94b5f1b7374027.zip
feat: First dev release
Diffstat (limited to 'src/Migrations')
-rw-r--r--src/Migrations/20230112230354_InitialCreate.Designer.cs114
-rw-r--r--src/Migrations/20230112230354_InitialCreate.cs68
-rw-r--r--src/Migrations/DBModelSnapshot.cs111
3 files changed, 293 insertions, 0 deletions
diff --git a/src/Migrations/20230112230354_InitialCreate.Designer.cs b/src/Migrations/20230112230354_InitialCreate.Designer.cs
new file mode 100644
index 0000000..b5a06c3
--- /dev/null
+++ b/src/Migrations/20230112230354_InitialCreate.Designer.cs
@@ -0,0 +1,114 @@
+// <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("20230112230354_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")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("PasswordHash")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("PublicId")
+ .IsRequired()
+ .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<string>("Content")
+ .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")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("PasswordHash")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("PublicId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property<bool>("Singleton")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.ToTable("Pastes");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/src/Migrations/20230112230354_InitialCreate.cs b/src/Migrations/20230112230354_InitialCreate.cs
new file mode 100644
index 0000000..97f9c36
--- /dev/null
+++ b/src/Migrations/20230112230354_InitialCreate.cs
@@ -0,0 +1,68 @@
+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: true),
+ Length = table.Column<long>(type: "INTEGER", nullable: false),
+ PublicId = table.Column<string>(type: "TEXT", 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: true),
+ Content = table.Column<string>(type: "TEXT", nullable: true),
+ Length = table.Column<long>(type: "INTEGER", nullable: false),
+ PublicId = table.Column<string>(type: "TEXT", 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/src/Migrations/DBModelSnapshot.cs b/src/Migrations/DBModelSnapshot.cs
new file mode 100644
index 0000000..8c9fb26
--- /dev/null
+++ b/src/Migrations/DBModelSnapshot.cs
@@ -0,0 +1,111 @@
+// <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")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("PasswordHash")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("PublicId")
+ .IsRequired()
+ .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<string>("Content")
+ .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")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("PasswordHash")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("PublicId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property<bool>("Singleton")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.ToTable("Pastes");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}