mirror of https://github.com/ErsatzTV/ErsatzTV.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
737 B
23 lines
737 B
using Microsoft.EntityFrameworkCore.Migrations; |
|
|
|
#nullable disable |
|
|
|
namespace ErsatzTV.Infrastructure.Sqlite.Migrations |
|
{ |
|
public partial class Add_LocalLibrary_Songs : Migration |
|
{ |
|
protected override void Up(MigrationBuilder migrationBuilder) |
|
{ |
|
// create local songs library |
|
migrationBuilder.Sql( |
|
@"INSERT INTO Library (Name, MediaKind, MediaSourceId) |
|
SELECT 'Songs', 5, Id FROM |
|
(SELECT LMS.Id FROM LocalMediaSource LMS LIMIT 1)"); |
|
migrationBuilder.Sql("INSERT INTO LocalLibrary (Id) Values (last_insert_rowid())"); |
|
} |
|
|
|
protected override void Down(MigrationBuilder migrationBuilder) |
|
{ |
|
} |
|
} |
|
}
|
|
|