using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace KfChatDotNetBot.Migrations { /// public partial class Streams : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Streams", columns: table => new { Id = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), UserId = table.Column(type: "INTEGER", nullable: true), StreamUrl = table.Column(type: "TEXT", nullable: false), Service = table.Column(type: "INTEGER", nullable: false), Metadata = table.Column(type: "TEXT", nullable: true), AutoCapture = table.Column(type: "INTEGER", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Streams", x => x.Id); table.ForeignKey( name: "FK_Streams_Users_UserId", column: x => x.UserId, principalTable: "Users", principalColumn: "Id"); }); migrationBuilder.CreateIndex( name: "IX_Streams_UserId", table: "Streams", column: "UserId"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Streams"); } } }