using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace iknow_api.Migrations { /// public partial class InitialCreate : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "User", columns: table => new { Id = table.Column(type: "integer", nullable: false) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), Name = table.Column(type: "text", nullable: true), Surname = table.Column(type: "text", nullable: true), Index = table.Column(type: "text", nullable: true), Email = table.Column(type: "text", nullable: true), PasswordHash = table.Column(type: "text", nullable: true), Bday = table.Column(type: "timestamp with time zone", nullable: false), CreatedAt = table.Column(type: "timestamp with time zone", nullable: false), Role = table.Column(type: "integer", nullable: false) }, constraints: table => { table.PrimaryKey("PK_User", x => x.Id); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "User"); } } }