mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 19:54:55 +00:00
fix searching of push tokens
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Govor.Data.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class FixPushTokensIndexs : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_UserPushTokens_UserId",
|
||||
table: "UserPushTokens");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Token",
|
||||
table: "UserPushTokens",
|
||||
type: "character varying(512)",
|
||||
maxLength: 512,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Provider",
|
||||
table: "UserPushTokens",
|
||||
type: "character varying(50)",
|
||||
maxLength: 50,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Platform",
|
||||
table: "UserPushTokens",
|
||||
type: "character varying(50)",
|
||||
maxLength: 50,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Token",
|
||||
table: "UserPushTokens",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(512)",
|
||||
oldMaxLength: 512);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Provider",
|
||||
table: "UserPushTokens",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(50)",
|
||||
oldMaxLength: 50);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Platform",
|
||||
table: "UserPushTokens",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(50)",
|
||||
oldMaxLength: 50);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_UserPushTokens_UserId",
|
||||
table: "UserPushTokens",
|
||||
column: "UserId",
|
||||
unique: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user