song-of-the-day/song_of_the_day/Data/Migrations/20250719222759_fix issues with Spotify session data for users.cs

64 lines
1.9 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace song_of_the_day.DataMigrations
{
/// <inheritdoc />
public partial class fixissueswithSpotifysessiondataforusers : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "SpotiyAuthAccessToken",
table: "Users",
type: "text",
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<DateTime>(
name: "SpotiyAuthCreatedAt",
table: "Users",
type: "timestamp with time zone",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<int>(
name: "SpotiyAuthExpiresAfterSeconds",
table: "Users",
type: "integer",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<string>(
name: "SpotiyAuthRefreshToken",
table: "Users",
type: "text",
nullable: false,
defaultValue: "");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "SpotiyAuthAccessToken",
table: "Users");
migrationBuilder.DropColumn(
name: "SpotiyAuthCreatedAt",
table: "Users");
migrationBuilder.DropColumn(
name: "SpotiyAuthExpiresAfterSeconds",
table: "Users");
migrationBuilder.DropColumn(
name: "SpotiyAuthRefreshToken",
table: "Users");
}
}
}