From a9860b28f2be123d1f0bfad504165992a4c841ed Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Tue, 10 Jan 2023 21:46:03 +0100 Subject: feat: feat --- BlobBin/Migrations/20230110204008_InitialCreate.cs | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 BlobBin/Migrations/20230110204008_InitialCreate.cs (limited to 'BlobBin/Migrations/20230110204008_InitialCreate.cs') 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 +{ + /// + public partial class InitialCreate : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "Files", + columns: table => new + { + Id = table.Column(type: "TEXT", nullable: false), + Name = table.Column(type: "TEXT", nullable: false), + Length = table.Column(type: "INTEGER", nullable: false), + CreatedAt = table.Column(type: "TEXT", nullable: false), + CreatedBy = table.Column(type: "TEXT", nullable: false), + DeletedAt = table.Column(type: "TEXT", nullable: true), + PasswordHash = table.Column(type: "TEXT", nullable: true), + Singleton = table.Column(type: "INTEGER", nullable: false), + AutoDeleteAfter = table.Column(type: "TEXT", nullable: true), + MimeType = table.Column(type: "TEXT", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Files", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Pastes", + columns: table => new + { + Id = table.Column(type: "TEXT", nullable: false), + Name = table.Column(type: "TEXT", nullable: false), + Length = table.Column(type: "INTEGER", nullable: false), + CreatedAt = table.Column(type: "TEXT", nullable: false), + CreatedBy = table.Column(type: "TEXT", nullable: false), + DeletedAt = table.Column(type: "TEXT", nullable: true), + PasswordHash = table.Column(type: "TEXT", nullable: true), + Singleton = table.Column(type: "INTEGER", nullable: false), + AutoDeleteAfter = table.Column(type: "TEXT", nullable: true), + MimeType = table.Column(type: "TEXT", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Pastes", x => x.Id); + }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "Files"); + + migrationBuilder.DropTable( + name: "Pastes"); + } + } +} -- cgit v1.3