52 lines
		
	
	
	
		
			1.6 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
		
		
			
		
	
	
			52 lines
		
	
	
	
		
			1.6 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
|  | using System.Collections.Generic; | |||
|  | using Microsoft.EntityFrameworkCore.Infrastructure; | |||
|  | using Microsoft.EntityFrameworkCore.Migrations; | |||
|  | 
 | |||
|  | #nullable disable | |||
|  | 
 | |||
|  | namespace Foxnouns.Backend.Database.Migrations | |||
|  | { | |||
|  |     /// <inheritdoc /> | |||
|  |     [DbContext(typeof(DatabaseContext))] | |||
|  |     [Migration("20241217195351_AddFediAppForceRefresh")] | |||
|  |     public partial class AddFediAppForceRefresh : Migration | |||
|  |     { | |||
|  |         /// <inheritdoc /> | |||
|  |         protected override void Up(MigrationBuilder migrationBuilder) | |||
|  |         { | |||
|  |             migrationBuilder.AlterColumn<Dictionary<string, string>>( | |||
|  |                 name: "localization_params", | |||
|  |                 table: "notifications", | |||
|  |                 type: "hstore", | |||
|  |                 nullable: false, | |||
|  |                 oldClrType: typeof(Dictionary<string, string>), | |||
|  |                 oldType: "hstore", | |||
|  |                 oldNullable: true | |||
|  |             ); | |||
|  | 
 | |||
|  |             migrationBuilder.AddColumn<bool>( | |||
|  |                 name: "force_refresh", | |||
|  |                 table: "fediverse_applications", | |||
|  |                 type: "boolean", | |||
|  |                 nullable: false, | |||
|  |                 defaultValue: false | |||
|  |             ); | |||
|  |         } | |||
|  | 
 | |||
|  |         /// <inheritdoc /> | |||
|  |         protected override void Down(MigrationBuilder migrationBuilder) | |||
|  |         { | |||
|  |             migrationBuilder.DropColumn(name: "force_refresh", table: "fediverse_applications"); | |||
|  | 
 | |||
|  |             migrationBuilder.AlterColumn<Dictionary<string, string>>( | |||
|  |                 name: "localization_params", | |||
|  |                 table: "notifications", | |||
|  |                 type: "hstore", | |||
|  |                 nullable: true, | |||
|  |                 oldClrType: typeof(Dictionary<string, string>), | |||
|  |                 oldType: "hstore" | |||
|  |             ); | |||
|  |         } | |||
|  |     } | |||
|  | } |