add device token
This commit is contained in:
1218
src/GreenHome.Infrastructure/Migrations/20251217154130_AddDeviceTokenAndPhoneFields.Designer.cs
generated
Normal file
1218
src/GreenHome.Infrastructure/Migrations/20251217154130_AddDeviceTokenAndPhoneFields.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,81 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace GreenHome.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddDeviceTokenAndPhoneFields : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "DevicePhoneNumber",
|
||||
table: "DeviceSettings",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "SimCardType",
|
||||
table: "DeviceSettings",
|
||||
type: "int",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "TokenCode",
|
||||
table: "DeviceSettings",
|
||||
type: "nvarchar(max)",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "TokenExpiresAt",
|
||||
table: "DeviceSettings",
|
||||
type: "datetime2",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "UploadIntervalMin",
|
||||
table: "DeviceSettings",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "VerificationCode",
|
||||
table: "DeviceSettings",
|
||||
type: "nvarchar(max)",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DevicePhoneNumber",
|
||||
table: "DeviceSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SimCardType",
|
||||
table: "DeviceSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TokenCode",
|
||||
table: "DeviceSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TokenExpiresAt",
|
||||
table: "DeviceSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UploadIntervalMin",
|
||||
table: "DeviceSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "VerificationCode",
|
||||
table: "DeviceSettings");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -590,6 +590,10 @@ namespace GreenHome.Infrastructure.Migrations
|
||||
b.Property<int>("DeviceId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("DevicePhoneNumber")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<decimal?>("Latitude")
|
||||
.HasColumnType("decimal(9,6)");
|
||||
|
||||
@@ -616,9 +620,24 @@ namespace GreenHome.Infrastructure.Migrations
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<int?>("SimCardType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("TokenCode")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime?>("TokenExpiresAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("UpdatedAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("UploadIntervalMin")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("VerificationCode")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("DeviceId")
|
||||
|
||||
Reference in New Issue
Block a user