using System.Collections.Generic; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace DysonNetwork.Drive.Migrations { /// public partial class CleanCloudFile : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "file_meta", table: "files"); migrationBuilder.DropColumn( name: "has_compression", table: "files"); migrationBuilder.DropColumn( name: "has_thumbnail", table: "files"); migrationBuilder.DropColumn( name: "hash", table: "files"); migrationBuilder.DropColumn( name: "is_encrypted", table: "files"); migrationBuilder.DropColumn( name: "mime_type", table: "files"); migrationBuilder.DropColumn( name: "size", table: "files"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn>( name: "file_meta", table: "files", type: "jsonb", nullable: true); migrationBuilder.AddColumn( name: "has_compression", table: "files", type: "boolean", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "has_thumbnail", table: "files", type: "boolean", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "hash", table: "files", type: "character varying(256)", maxLength: 256, nullable: true); migrationBuilder.AddColumn( name: "is_encrypted", table: "files", type: "boolean", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "mime_type", table: "files", type: "character varying(256)", maxLength: 256, nullable: true); migrationBuilder.AddColumn( name: "size", table: "files", type: "bigint", nullable: false, defaultValue: 0L); } } }