mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 22:25:28 +01:00
* wip * add in storage system * ui fixes * fix settings ui * Add Files Crud UI * add titles * link files to users * add migration * set blob to public * remove base 64 read code * fix file query model init * move view model to own file * fix local root path * use datadir for local storage * move to services * add direct file url * try fix tests * remove magic string * remove other magic strings * show error message on unsupported provider * fix asp net version * redirect to storage settings if provider is not supported * start writing tests * fix tests * fix test again * add some more to the tests * more tests * try making local provider work on tests * fix formfile * fix small issue with returning deleted file * check if returned data is null for deleted file * validate azure Container name * more state fixes * change azure test trait * add tmp file url generator * fix tests * small clean * disable amazon and google comment out unused code for now comment out google/amazon
43 lines
1.5 KiB
C#
43 lines
1.5 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace BTCPayServer.Migrations
|
|
{
|
|
public partial class AddFiles : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "Files",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<string>(nullable: false),
|
|
FileName = table.Column<string>(nullable: true),
|
|
StorageFileName = table.Column<string>(nullable: true),
|
|
Timestamp = table.Column<DateTime>(nullable: false),
|
|
ApplicationUserId = table.Column<string>(nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_Files", x => x.Id);
|
|
table.ForeignKey(
|
|
name: "FK_Files_AspNetUsers_ApplicationUserId",
|
|
column: x => x.ApplicationUserId,
|
|
principalTable: "AspNetUsers",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Restrict);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Files_ApplicationUserId",
|
|
table: "Files",
|
|
column: "ApplicationUserId");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "Files");
|
|
}
|
|
}
|
|
}
|