using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace DatabaseTest.Migrations { /// public partial class Initial : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Permissions", columns: table => new { RecordId = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), PermissionText = table.Column(type: "TEXT", maxLength: 255, nullable: false), OwnerId = table.Column(type: "INTEGER", nullable: false), GrantedAt = table.Column(type: "TEXT", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Permissions", x => x.RecordId); }); migrationBuilder.CreateTable( name: "Users", columns: table => new { Id = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), Username = table.Column(type: "TEXT", maxLength: 50, nullable: true), Email = table.Column(type: "TEXT", maxLength: 50, nullable: false), Password = table.Column(type: "TEXT", maxLength: 255, nullable: false), CreatedAt = table.Column(type: "TEXT", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Users", x => x.Id); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Permissions"); migrationBuilder.DropTable( name: "Users"); } } }