-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#102) ContentProxy: add file names and MIME types
- Loading branch information
Showing
11 changed files
with
163 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
Emulsion.Database/Migrations/20220828121717_FileNameAndMimeType.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
// <auto-generated /> | ||
namespace Emulsion.Database.Migrations | ||
|
||
open System | ||
open Emulsion.Database | ||
open Microsoft.EntityFrameworkCore | ||
open Microsoft.EntityFrameworkCore.Infrastructure | ||
open Microsoft.EntityFrameworkCore.Metadata | ||
open Microsoft.EntityFrameworkCore.Migrations | ||
open Microsoft.EntityFrameworkCore.Storage.ValueConversion | ||
|
||
[<DbContext(typeof<EmulsionDbContext>)>] | ||
[<Migration("20220828121717_FileNameAndMimeType")>] | ||
type FileNameAndMimeType() = | ||
inherit Migration() | ||
|
||
override this.Up(migrationBuilder:MigrationBuilder) = | ||
migrationBuilder.AddColumn<string>( | ||
name = "FileName" | ||
,table = "TelegramContents" | ||
,``type`` = "TEXT" | ||
,nullable = true | ||
) |> ignore | ||
|
||
migrationBuilder.AddColumn<string>( | ||
name = "MimeType" | ||
,table = "TelegramContents" | ||
,``type`` = "TEXT" | ||
,nullable = true | ||
) |> ignore | ||
|
||
|
||
override this.Down(migrationBuilder:MigrationBuilder) = | ||
migrationBuilder.DropColumn( | ||
name = "FileName" | ||
,table = "TelegramContents" | ||
) |> ignore | ||
|
||
migrationBuilder.DropColumn( | ||
name = "MimeType" | ||
,table = "TelegramContents" | ||
) |> ignore | ||
|
||
|
||
override this.BuildTargetModel(modelBuilder: ModelBuilder) = | ||
modelBuilder | ||
.HasAnnotation("ProductVersion", "5.0.10") | ||
|> ignore | ||
|
||
modelBuilder.Entity("Emulsion.Database.Entities.TelegramContent", (fun b -> | ||
|
||
b.Property<Int64>("Id") | ||
.IsRequired(true) | ||
.ValueGeneratedOnAdd() | ||
.HasColumnType("INTEGER") |> ignore | ||
b.Property<string>("ChatUserName") | ||
.IsRequired(false) | ||
.HasColumnType("TEXT") |> ignore | ||
b.Property<string>("FileId") | ||
.IsRequired(false) | ||
.HasColumnType("TEXT") |> ignore | ||
b.Property<string option>("FileName") | ||
.IsRequired(false) | ||
.HasColumnType("TEXT") |> ignore | ||
b.Property<Int64>("MessageId") | ||
.IsRequired(true) | ||
.HasColumnType("INTEGER") |> ignore | ||
b.Property<string option>("MimeType") | ||
.IsRequired(false) | ||
.HasColumnType("TEXT") |> ignore | ||
|
||
b.HasKey("Id") |> ignore | ||
|
||
b.ToTable("TelegramContents") |> ignore | ||
|
||
)) |> ignore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters