feat: song likes and initial implementation of Spotify playlist support, refs #9
This commit is contained in:
268
song_of_the_day/Data/Migrations/20250719185147_adding song likes and playlists.Designer.cs
generated
Normal file
268
song_of_the_day/Data/Migrations/20250719185147_adding song likes and playlists.Designer.cs
generated
Normal file
@@ -0,0 +1,268 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace song_of_the_day.DataMigrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20250719185147_adding song likes and playlists")]
|
||||
partial class addingsonglikesandplaylists
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "9.0.3")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("SmartPlaylistDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int?>("CreatedByUserId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("IncludesLikedSongs")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("IncludesUnCategorizedSongs")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("SpotifyPlaylistId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CreatedByUserId");
|
||||
|
||||
b.ToTable("SmartPlaylistDefinitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Song", b =>
|
||||
{
|
||||
b.Property<int>("SongId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("SongId"));
|
||||
|
||||
b.Property<string>("Artist")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("Provider")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("SmartPlaylistDefinitionId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("SmartPlaylistDefinitionId1")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("SpotifyId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Url")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("UserId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("SongId");
|
||||
|
||||
b.HasIndex("SmartPlaylistDefinitionId");
|
||||
|
||||
b.HasIndex("SmartPlaylistDefinitionId1");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Songs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SongSuggestion", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<bool>("HasUsedSuggestion")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int?>("SongId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("SuggestionHelperId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("UserHasSubmitted")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int?>("UserId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("SongId");
|
||||
|
||||
b.HasIndex("SuggestionHelperId");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("SongSuggestions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SuggestionHelper", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("SmartPlaylistDefinitionId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("SmartPlaylistDefinitionId");
|
||||
|
||||
b.ToTable("SuggestionHelpers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("User", b =>
|
||||
{
|
||||
b.Property<int>("UserId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("UserId"));
|
||||
|
||||
b.Property<bool>("AssociationInProgress")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("IsIntroduced")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("LdapUserName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("NickName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("SignalMemberId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("WasChosenForSuggestionThisRound")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.HasKey("UserId");
|
||||
|
||||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SmartPlaylistDefinition", b =>
|
||||
{
|
||||
b.HasOne("User", "CreatedBy")
|
||||
.WithMany()
|
||||
.HasForeignKey("CreatedByUserId");
|
||||
|
||||
b.Navigation("CreatedBy");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Song", b =>
|
||||
{
|
||||
b.HasOne("SmartPlaylistDefinition", null)
|
||||
.WithMany("ExplicitlyExcludedSongs")
|
||||
.HasForeignKey("SmartPlaylistDefinitionId");
|
||||
|
||||
b.HasOne("SmartPlaylistDefinition", null)
|
||||
.WithMany("ExplicitlyIncludedSongs")
|
||||
.HasForeignKey("SmartPlaylistDefinitionId1");
|
||||
|
||||
b.HasOne("User", null)
|
||||
.WithMany("LikedSongs")
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SongSuggestion", b =>
|
||||
{
|
||||
b.HasOne("Song", "Song")
|
||||
.WithMany()
|
||||
.HasForeignKey("SongId");
|
||||
|
||||
b.HasOne("SuggestionHelper", "SuggestionHelper")
|
||||
.WithMany()
|
||||
.HasForeignKey("SuggestionHelperId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.Navigation("Song");
|
||||
|
||||
b.Navigation("SuggestionHelper");
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SuggestionHelper", b =>
|
||||
{
|
||||
b.HasOne("SmartPlaylistDefinition", null)
|
||||
.WithMany("Categories")
|
||||
.HasForeignKey("SmartPlaylistDefinitionId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SmartPlaylistDefinition", b =>
|
||||
{
|
||||
b.Navigation("Categories");
|
||||
|
||||
b.Navigation("ExplicitlyExcludedSongs");
|
||||
|
||||
b.Navigation("ExplicitlyIncludedSongs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("User", b =>
|
||||
{
|
||||
b.Navigation("LikedSongs");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,170 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace song_of_the_day.DataMigrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class addingsonglikesandplaylists : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "SmartPlaylistDefinitionId",
|
||||
table: "SuggestionHelpers",
|
||||
type: "integer",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "SmartPlaylistDefinitionId",
|
||||
table: "Songs",
|
||||
type: "integer",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "SmartPlaylistDefinitionId1",
|
||||
table: "Songs",
|
||||
type: "integer",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "UserId",
|
||||
table: "Songs",
|
||||
type: "integer",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "SmartPlaylistDefinitions",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
Title = table.Column<string>(type: "text", nullable: true),
|
||||
Description = table.Column<string>(type: "text", nullable: true),
|
||||
CreatedByUserId = table.Column<int>(type: "integer", nullable: true),
|
||||
IncludesUnCategorizedSongs = table.Column<bool>(type: "boolean", nullable: false),
|
||||
IncludesLikedSongs = table.Column<bool>(type: "boolean", nullable: false),
|
||||
SpotifyPlaylistId = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SmartPlaylistDefinitions", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_SmartPlaylistDefinitions_Users_CreatedByUserId",
|
||||
column: x => x.CreatedByUserId,
|
||||
principalTable: "Users",
|
||||
principalColumn: "UserId");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_SuggestionHelpers_SmartPlaylistDefinitionId",
|
||||
table: "SuggestionHelpers",
|
||||
column: "SmartPlaylistDefinitionId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Songs_SmartPlaylistDefinitionId",
|
||||
table: "Songs",
|
||||
column: "SmartPlaylistDefinitionId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Songs_SmartPlaylistDefinitionId1",
|
||||
table: "Songs",
|
||||
column: "SmartPlaylistDefinitionId1");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Songs_UserId",
|
||||
table: "Songs",
|
||||
column: "UserId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_SmartPlaylistDefinitions_CreatedByUserId",
|
||||
table: "SmartPlaylistDefinitions",
|
||||
column: "CreatedByUserId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Songs_SmartPlaylistDefinitions_SmartPlaylistDefinitionId",
|
||||
table: "Songs",
|
||||
column: "SmartPlaylistDefinitionId",
|
||||
principalTable: "SmartPlaylistDefinitions",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Songs_SmartPlaylistDefinitions_SmartPlaylistDefinitionId1",
|
||||
table: "Songs",
|
||||
column: "SmartPlaylistDefinitionId1",
|
||||
principalTable: "SmartPlaylistDefinitions",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Songs_Users_UserId",
|
||||
table: "Songs",
|
||||
column: "UserId",
|
||||
principalTable: "Users",
|
||||
principalColumn: "UserId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_SuggestionHelpers_SmartPlaylistDefinitions_SmartPlaylistDef~",
|
||||
table: "SuggestionHelpers",
|
||||
column: "SmartPlaylistDefinitionId",
|
||||
principalTable: "SmartPlaylistDefinitions",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Songs_SmartPlaylistDefinitions_SmartPlaylistDefinitionId",
|
||||
table: "Songs");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Songs_SmartPlaylistDefinitions_SmartPlaylistDefinitionId1",
|
||||
table: "Songs");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Songs_Users_UserId",
|
||||
table: "Songs");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_SuggestionHelpers_SmartPlaylistDefinitions_SmartPlaylistDef~",
|
||||
table: "SuggestionHelpers");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "SmartPlaylistDefinitions");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_SuggestionHelpers_SmartPlaylistDefinitionId",
|
||||
table: "SuggestionHelpers");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Songs_SmartPlaylistDefinitionId",
|
||||
table: "Songs");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Songs_SmartPlaylistDefinitionId1",
|
||||
table: "Songs");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Songs_UserId",
|
||||
table: "Songs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SmartPlaylistDefinitionId",
|
||||
table: "SuggestionHelpers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SmartPlaylistDefinitionId",
|
||||
table: "Songs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SmartPlaylistDefinitionId1",
|
||||
table: "Songs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UserId",
|
||||
table: "Songs");
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,282 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace song_of_the_day.DataMigrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20250719222759_fix issues with Spotify session data for users")]
|
||||
partial class fixissueswithSpotifysessiondataforusers
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "9.0.3")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("SmartPlaylistDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int?>("CreatedByUserId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("IncludesLikedSongs")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("IncludesUnCategorizedSongs")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("SpotifyPlaylistId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CreatedByUserId");
|
||||
|
||||
b.ToTable("SmartPlaylistDefinitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Song", b =>
|
||||
{
|
||||
b.Property<int>("SongId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("SongId"));
|
||||
|
||||
b.Property<string>("Artist")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("Provider")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("SmartPlaylistDefinitionId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("SmartPlaylistDefinitionId1")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("SpotifyId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Url")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("UserId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("SongId");
|
||||
|
||||
b.HasIndex("SmartPlaylistDefinitionId");
|
||||
|
||||
b.HasIndex("SmartPlaylistDefinitionId1");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Songs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SongSuggestion", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<bool>("HasUsedSuggestion")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int?>("SongId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("SuggestionHelperId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("UserHasSubmitted")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int?>("UserId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("SongId");
|
||||
|
||||
b.HasIndex("SuggestionHelperId");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("SongSuggestions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SuggestionHelper", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("SmartPlaylistDefinitionId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("SmartPlaylistDefinitionId");
|
||||
|
||||
b.ToTable("SuggestionHelpers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("User", b =>
|
||||
{
|
||||
b.Property<int>("UserId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("UserId"));
|
||||
|
||||
b.Property<bool>("AssociationInProgress")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("IsIntroduced")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("LdapUserName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("NickName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("SignalMemberId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("SpotiyAuthAccessToken")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTime>("SpotiyAuthCreatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int>("SpotiyAuthExpiresAfterSeconds")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("SpotiyAuthRefreshToken")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("WasChosenForSuggestionThisRound")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.HasKey("UserId");
|
||||
|
||||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SmartPlaylistDefinition", b =>
|
||||
{
|
||||
b.HasOne("User", "CreatedBy")
|
||||
.WithMany()
|
||||
.HasForeignKey("CreatedByUserId");
|
||||
|
||||
b.Navigation("CreatedBy");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Song", b =>
|
||||
{
|
||||
b.HasOne("SmartPlaylistDefinition", null)
|
||||
.WithMany("ExplicitlyExcludedSongs")
|
||||
.HasForeignKey("SmartPlaylistDefinitionId");
|
||||
|
||||
b.HasOne("SmartPlaylistDefinition", null)
|
||||
.WithMany("ExplicitlyIncludedSongs")
|
||||
.HasForeignKey("SmartPlaylistDefinitionId1");
|
||||
|
||||
b.HasOne("User", null)
|
||||
.WithMany("LikedSongs")
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SongSuggestion", b =>
|
||||
{
|
||||
b.HasOne("Song", "Song")
|
||||
.WithMany()
|
||||
.HasForeignKey("SongId");
|
||||
|
||||
b.HasOne("SuggestionHelper", "SuggestionHelper")
|
||||
.WithMany()
|
||||
.HasForeignKey("SuggestionHelperId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.Navigation("Song");
|
||||
|
||||
b.Navigation("SuggestionHelper");
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SuggestionHelper", b =>
|
||||
{
|
||||
b.HasOne("SmartPlaylistDefinition", null)
|
||||
.WithMany("Categories")
|
||||
.HasForeignKey("SmartPlaylistDefinitionId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SmartPlaylistDefinition", b =>
|
||||
{
|
||||
b.Navigation("Categories");
|
||||
|
||||
b.Navigation("ExplicitlyExcludedSongs");
|
||||
|
||||
b.Navigation("ExplicitlyIncludedSongs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("User", b =>
|
||||
{
|
||||
b.Navigation("LikedSongs");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,63 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
282
song_of_the_day/Data/Migrations/20250719230009_some more fixes.Designer.cs
generated
Normal file
282
song_of_the_day/Data/Migrations/20250719230009_some more fixes.Designer.cs
generated
Normal file
@@ -0,0 +1,282 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace song_of_the_day.DataMigrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20250719230009_some more fixes")]
|
||||
partial class somemorefixes
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "9.0.3")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("SmartPlaylistDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int?>("CreatedByUserId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("IncludesLikedSongs")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("IncludesUnCategorizedSongs")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("SpotifyPlaylistId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CreatedByUserId");
|
||||
|
||||
b.ToTable("SmartPlaylistDefinitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Song", b =>
|
||||
{
|
||||
b.Property<int>("SongId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("SongId"));
|
||||
|
||||
b.Property<string>("Artist")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("Provider")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("SmartPlaylistDefinitionId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("SmartPlaylistDefinitionId1")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("SpotifyId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Url")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("UserId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("SongId");
|
||||
|
||||
b.HasIndex("SmartPlaylistDefinitionId");
|
||||
|
||||
b.HasIndex("SmartPlaylistDefinitionId1");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Songs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SongSuggestion", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<bool>("HasUsedSuggestion")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int?>("SongId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("SuggestionHelperId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("UserHasSubmitted")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int?>("UserId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("SongId");
|
||||
|
||||
b.HasIndex("SuggestionHelperId");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("SongSuggestions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SuggestionHelper", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("SmartPlaylistDefinitionId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("SmartPlaylistDefinitionId");
|
||||
|
||||
b.ToTable("SuggestionHelpers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("User", b =>
|
||||
{
|
||||
b.Property<int>("UserId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("UserId"));
|
||||
|
||||
b.Property<bool>("AssociationInProgress")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("IsIntroduced")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("LdapUserName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("NickName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("SignalMemberId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("SpotifyAuthAccessToken")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTime>("SpotifyAuthCreatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int>("SpotifyAuthExpiresAfterSeconds")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("SpotifyAuthRefreshToken")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("WasChosenForSuggestionThisRound")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.HasKey("UserId");
|
||||
|
||||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SmartPlaylistDefinition", b =>
|
||||
{
|
||||
b.HasOne("User", "CreatedBy")
|
||||
.WithMany()
|
||||
.HasForeignKey("CreatedByUserId");
|
||||
|
||||
b.Navigation("CreatedBy");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Song", b =>
|
||||
{
|
||||
b.HasOne("SmartPlaylistDefinition", null)
|
||||
.WithMany("ExplicitlyExcludedSongs")
|
||||
.HasForeignKey("SmartPlaylistDefinitionId");
|
||||
|
||||
b.HasOne("SmartPlaylistDefinition", null)
|
||||
.WithMany("ExplicitlyIncludedSongs")
|
||||
.HasForeignKey("SmartPlaylistDefinitionId1");
|
||||
|
||||
b.HasOne("User", null)
|
||||
.WithMany("LikedSongs")
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SongSuggestion", b =>
|
||||
{
|
||||
b.HasOne("Song", "Song")
|
||||
.WithMany()
|
||||
.HasForeignKey("SongId");
|
||||
|
||||
b.HasOne("SuggestionHelper", "SuggestionHelper")
|
||||
.WithMany()
|
||||
.HasForeignKey("SuggestionHelperId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.Navigation("Song");
|
||||
|
||||
b.Navigation("SuggestionHelper");
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SuggestionHelper", b =>
|
||||
{
|
||||
b.HasOne("SmartPlaylistDefinition", null)
|
||||
.WithMany("Categories")
|
||||
.HasForeignKey("SmartPlaylistDefinitionId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SmartPlaylistDefinition", b =>
|
||||
{
|
||||
b.Navigation("Categories");
|
||||
|
||||
b.Navigation("ExplicitlyExcludedSongs");
|
||||
|
||||
b.Navigation("ExplicitlyIncludedSongs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("User", b =>
|
||||
{
|
||||
b.Navigation("LikedSongs");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,58 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace song_of_the_day.DataMigrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class somemorefixes : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "SpotiyAuthRefreshToken",
|
||||
table: "Users",
|
||||
newName: "SpotifyAuthRefreshToken");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "SpotiyAuthExpiresAfterSeconds",
|
||||
table: "Users",
|
||||
newName: "SpotifyAuthExpiresAfterSeconds");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "SpotiyAuthCreatedAt",
|
||||
table: "Users",
|
||||
newName: "SpotifyAuthCreatedAt");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "SpotiyAuthAccessToken",
|
||||
table: "Users",
|
||||
newName: "SpotifyAuthAccessToken");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "SpotifyAuthRefreshToken",
|
||||
table: "Users",
|
||||
newName: "SpotiyAuthRefreshToken");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "SpotifyAuthExpiresAfterSeconds",
|
||||
table: "Users",
|
||||
newName: "SpotiyAuthExpiresAfterSeconds");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "SpotifyAuthCreatedAt",
|
||||
table: "Users",
|
||||
newName: "SpotiyAuthCreatedAt");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "SpotifyAuthAccessToken",
|
||||
table: "Users",
|
||||
newName: "SpotiyAuthAccessToken");
|
||||
}
|
||||
}
|
||||
}
|
282
song_of_the_day/Data/Migrations/20250719233912_explicitly specify keys.Designer.cs
generated
Normal file
282
song_of_the_day/Data/Migrations/20250719233912_explicitly specify keys.Designer.cs
generated
Normal file
@@ -0,0 +1,282 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace song_of_the_day.DataMigrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20250719233912_explicitly specify keys")]
|
||||
partial class explicitlyspecifykeys
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "9.0.3")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("SmartPlaylistDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int?>("CreatedByUserId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("IncludesLikedSongs")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("IncludesUnCategorizedSongs")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("SpotifyPlaylistId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CreatedByUserId");
|
||||
|
||||
b.ToTable("SmartPlaylistDefinitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Song", b =>
|
||||
{
|
||||
b.Property<int>("SongId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("SongId"));
|
||||
|
||||
b.Property<string>("Artist")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("Provider")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("SmartPlaylistDefinitionId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("SmartPlaylistDefinitionId1")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("SpotifyId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Url")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("UserId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("SongId");
|
||||
|
||||
b.HasIndex("SmartPlaylistDefinitionId");
|
||||
|
||||
b.HasIndex("SmartPlaylistDefinitionId1");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Songs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SongSuggestion", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<bool>("HasUsedSuggestion")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int?>("SongId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("SuggestionHelperId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("UserHasSubmitted")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int?>("UserId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("SongId");
|
||||
|
||||
b.HasIndex("SuggestionHelperId");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("SongSuggestions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SuggestionHelper", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("SmartPlaylistDefinitionId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("SmartPlaylistDefinitionId");
|
||||
|
||||
b.ToTable("SuggestionHelpers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("User", b =>
|
||||
{
|
||||
b.Property<int>("UserId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("UserId"));
|
||||
|
||||
b.Property<bool>("AssociationInProgress")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("IsIntroduced")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("LdapUserName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("NickName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("SignalMemberId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("SpotifyAuthAccessToken")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTime>("SpotifyAuthCreatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int>("SpotifyAuthExpiresAfterSeconds")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("SpotifyAuthRefreshToken")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("WasChosenForSuggestionThisRound")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.HasKey("UserId");
|
||||
|
||||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SmartPlaylistDefinition", b =>
|
||||
{
|
||||
b.HasOne("User", "CreatedBy")
|
||||
.WithMany()
|
||||
.HasForeignKey("CreatedByUserId");
|
||||
|
||||
b.Navigation("CreatedBy");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Song", b =>
|
||||
{
|
||||
b.HasOne("SmartPlaylistDefinition", null)
|
||||
.WithMany("ExplicitlyExcludedSongs")
|
||||
.HasForeignKey("SmartPlaylistDefinitionId");
|
||||
|
||||
b.HasOne("SmartPlaylistDefinition", null)
|
||||
.WithMany("ExplicitlyIncludedSongs")
|
||||
.HasForeignKey("SmartPlaylistDefinitionId1");
|
||||
|
||||
b.HasOne("User", null)
|
||||
.WithMany("LikedSongs")
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SongSuggestion", b =>
|
||||
{
|
||||
b.HasOne("Song", "Song")
|
||||
.WithMany()
|
||||
.HasForeignKey("SongId");
|
||||
|
||||
b.HasOne("SuggestionHelper", "SuggestionHelper")
|
||||
.WithMany()
|
||||
.HasForeignKey("SuggestionHelperId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.Navigation("Song");
|
||||
|
||||
b.Navigation("SuggestionHelper");
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SuggestionHelper", b =>
|
||||
{
|
||||
b.HasOne("SmartPlaylistDefinition", null)
|
||||
.WithMany("Categories")
|
||||
.HasForeignKey("SmartPlaylistDefinitionId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SmartPlaylistDefinition", b =>
|
||||
{
|
||||
b.Navigation("Categories");
|
||||
|
||||
b.Navigation("ExplicitlyExcludedSongs");
|
||||
|
||||
b.Navigation("ExplicitlyIncludedSongs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("User", b =>
|
||||
{
|
||||
b.Navigation("LikedSongs");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace song_of_the_day.DataMigrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class explicitlyspecifykeys : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
280
song_of_the_day/Data/Migrations/20250720003809_fix auth token non-null contraint.Designer.cs
generated
Normal file
280
song_of_the_day/Data/Migrations/20250720003809_fix auth token non-null contraint.Designer.cs
generated
Normal file
@@ -0,0 +1,280 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace song_of_the_day.DataMigrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20250720003809_fix auth token non-null contraint")]
|
||||
partial class fixauthtokennonnullcontraint
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "9.0.3")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("SmartPlaylistDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int?>("CreatedByUserId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("IncludesLikedSongs")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("IncludesUnCategorizedSongs")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("SpotifyPlaylistId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CreatedByUserId");
|
||||
|
||||
b.ToTable("SmartPlaylistDefinitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Song", b =>
|
||||
{
|
||||
b.Property<int>("SongId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("SongId"));
|
||||
|
||||
b.Property<string>("Artist")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("Provider")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("SmartPlaylistDefinitionId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("SmartPlaylistDefinitionId1")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("SpotifyId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Url")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("UserId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("SongId");
|
||||
|
||||
b.HasIndex("SmartPlaylistDefinitionId");
|
||||
|
||||
b.HasIndex("SmartPlaylistDefinitionId1");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Songs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SongSuggestion", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<bool>("HasUsedSuggestion")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int?>("SongId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("SuggestionHelperId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("UserHasSubmitted")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int?>("UserId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("SongId");
|
||||
|
||||
b.HasIndex("SuggestionHelperId");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("SongSuggestions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SuggestionHelper", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("SmartPlaylistDefinitionId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("SmartPlaylistDefinitionId");
|
||||
|
||||
b.ToTable("SuggestionHelpers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("User", b =>
|
||||
{
|
||||
b.Property<int>("UserId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("UserId"));
|
||||
|
||||
b.Property<bool>("AssociationInProgress")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("IsIntroduced")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("LdapUserName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("NickName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("SignalMemberId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("SpotifyAuthAccessToken")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTime?>("SpotifyAuthCreatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int?>("SpotifyAuthExpiresAfterSeconds")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("SpotifyAuthRefreshToken")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("WasChosenForSuggestionThisRound")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.HasKey("UserId");
|
||||
|
||||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SmartPlaylistDefinition", b =>
|
||||
{
|
||||
b.HasOne("User", "CreatedBy")
|
||||
.WithMany()
|
||||
.HasForeignKey("CreatedByUserId");
|
||||
|
||||
b.Navigation("CreatedBy");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Song", b =>
|
||||
{
|
||||
b.HasOne("SmartPlaylistDefinition", null)
|
||||
.WithMany("ExplicitlyExcludedSongs")
|
||||
.HasForeignKey("SmartPlaylistDefinitionId");
|
||||
|
||||
b.HasOne("SmartPlaylistDefinition", null)
|
||||
.WithMany("ExplicitlyIncludedSongs")
|
||||
.HasForeignKey("SmartPlaylistDefinitionId1");
|
||||
|
||||
b.HasOne("User", null)
|
||||
.WithMany("LikedSongs")
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SongSuggestion", b =>
|
||||
{
|
||||
b.HasOne("Song", "Song")
|
||||
.WithMany()
|
||||
.HasForeignKey("SongId");
|
||||
|
||||
b.HasOne("SuggestionHelper", "SuggestionHelper")
|
||||
.WithMany()
|
||||
.HasForeignKey("SuggestionHelperId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.Navigation("Song");
|
||||
|
||||
b.Navigation("SuggestionHelper");
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SuggestionHelper", b =>
|
||||
{
|
||||
b.HasOne("SmartPlaylistDefinition", null)
|
||||
.WithMany("Categories")
|
||||
.HasForeignKey("SmartPlaylistDefinitionId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SmartPlaylistDefinition", b =>
|
||||
{
|
||||
b.Navigation("Categories");
|
||||
|
||||
b.Navigation("ExplicitlyExcludedSongs");
|
||||
|
||||
b.Navigation("ExplicitlyIncludedSongs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("User", b =>
|
||||
{
|
||||
b.Navigation("LikedSongs");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,91 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace song_of_the_day.DataMigrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class fixauthtokennonnullcontraint : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "SpotifyAuthRefreshToken",
|
||||
table: "Users",
|
||||
type: "text",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "SpotifyAuthExpiresAfterSeconds",
|
||||
table: "Users",
|
||||
type: "integer",
|
||||
nullable: true,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "integer");
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "SpotifyAuthCreatedAt",
|
||||
table: "Users",
|
||||
type: "timestamp with time zone",
|
||||
nullable: true,
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "timestamp with time zone");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "SpotifyAuthAccessToken",
|
||||
table: "Users",
|
||||
type: "text",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "SpotifyAuthRefreshToken",
|
||||
table: "Users",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "SpotifyAuthExpiresAfterSeconds",
|
||||
table: "Users",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "integer",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "SpotifyAuthCreatedAt",
|
||||
table: "Users",
|
||||
type: "timestamp with time zone",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "timestamp with time zone",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "SpotifyAuthAccessToken",
|
||||
table: "Users",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text",
|
||||
oldNullable: true);
|
||||
}
|
||||
}
|
||||
}
|
@@ -21,6 +21,39 @@ namespace song_of_the_day.DataMigrations
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("SmartPlaylistDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int?>("CreatedByUserId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("IncludesLikedSongs")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("IncludesUnCategorizedSongs")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("SpotifyPlaylistId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CreatedByUserId");
|
||||
|
||||
b.ToTable("SmartPlaylistDefinitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Song", b =>
|
||||
{
|
||||
b.Property<int>("SongId")
|
||||
@@ -38,14 +71,29 @@ namespace song_of_the_day.DataMigrations
|
||||
b.Property<int?>("Provider")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("SmartPlaylistDefinitionId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("SmartPlaylistDefinitionId1")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("SpotifyId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Url")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("UserId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("SongId");
|
||||
|
||||
b.HasIndex("SmartPlaylistDefinitionId");
|
||||
|
||||
b.HasIndex("SmartPlaylistDefinitionId1");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Songs");
|
||||
});
|
||||
|
||||
@@ -97,11 +145,16 @@ namespace song_of_the_day.DataMigrations
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("SmartPlaylistDefinitionId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("SmartPlaylistDefinitionId");
|
||||
|
||||
b.ToTable("SuggestionHelpers");
|
||||
});
|
||||
|
||||
@@ -131,6 +184,18 @@ namespace song_of_the_day.DataMigrations
|
||||
b.Property<string>("SignalMemberId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("SpotifyAuthAccessToken")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTime?>("SpotifyAuthCreatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int?>("SpotifyAuthExpiresAfterSeconds")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("SpotifyAuthRefreshToken")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("WasChosenForSuggestionThisRound")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
@@ -139,6 +204,30 @@ namespace song_of_the_day.DataMigrations
|
||||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SmartPlaylistDefinition", b =>
|
||||
{
|
||||
b.HasOne("User", "CreatedBy")
|
||||
.WithMany()
|
||||
.HasForeignKey("CreatedByUserId");
|
||||
|
||||
b.Navigation("CreatedBy");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Song", b =>
|
||||
{
|
||||
b.HasOne("SmartPlaylistDefinition", null)
|
||||
.WithMany("ExplicitlyExcludedSongs")
|
||||
.HasForeignKey("SmartPlaylistDefinitionId");
|
||||
|
||||
b.HasOne("SmartPlaylistDefinition", null)
|
||||
.WithMany("ExplicitlyIncludedSongs")
|
||||
.HasForeignKey("SmartPlaylistDefinitionId1");
|
||||
|
||||
b.HasOne("User", null)
|
||||
.WithMany("LikedSongs")
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SongSuggestion", b =>
|
||||
{
|
||||
b.HasOne("Song", "Song")
|
||||
@@ -161,6 +250,27 @@ namespace song_of_the_day.DataMigrations
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SuggestionHelper", b =>
|
||||
{
|
||||
b.HasOne("SmartPlaylistDefinition", null)
|
||||
.WithMany("Categories")
|
||||
.HasForeignKey("SmartPlaylistDefinitionId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SmartPlaylistDefinition", b =>
|
||||
{
|
||||
b.Navigation("Categories");
|
||||
|
||||
b.Navigation("ExplicitlyExcludedSongs");
|
||||
|
||||
b.Navigation("ExplicitlyIncludedSongs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("User", b =>
|
||||
{
|
||||
b.Navigation("LikedSongs");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user