using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace DugunSalonu.Migrations { /// public partial class mg9 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "referans", columns: table => new { id = table.Column(type: "integer", nullable: false) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), turu = table.Column(type: "character varying(50)", maxLength: 50, nullable: false), kodu = table.Column(type: "character varying(20)", maxLength: 20, nullable: false), adi = table.Column(type: "character varying(50)", maxLength: 50, nullable: false), kts = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "NOW()"), kk = table.Column(type: "integer", nullable: false), aktif = table.Column(type: "boolean", nullable: false) }, constraints: table => { table.PrimaryKey("PK_referans", x => x.id); }); migrationBuilder.CreateIndex( name: "IX_referans_turu_kodu", table: "referans", columns: new[] { "turu", "kodu" }, unique: true); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "referans"); } } }