using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace DugunSalonu.Migrations { /// public partial class mg7 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_salon_il_ılıd", table: "salon"); migrationBuilder.DropColumn( name: "ılce", table: "salon"); migrationBuilder.RenameColumn( name: "ceptel", table: "salon", newName: "CepTel"); migrationBuilder.RenameColumn( name: "ılıd", table: "salon", newName: "ilid"); migrationBuilder.RenameColumn( name: "ıd", table: "salon", newName: "id"); migrationBuilder.RenameIndex( name: "IX_salon_ılıd", table: "salon", newName: "IX_salon_ilid"); migrationBuilder.RenameColumn( name: "ıd", table: "kullanici", newName: "id"); migrationBuilder.RenameColumn( name: "ıd", table: "il", newName: "id"); migrationBuilder.AlterColumn( name: "webadres", table: "salon", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "verginumarasi", table: "salon", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "vergidairesi", table: "salon", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "telefon", table: "salon", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "adres", table: "salon", type: "character varying(250)", maxLength: 250, nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "adi", table: "salon", type: "character varying(150)", maxLength: 150, nullable: false, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "ilid", table: "salon", type: "integer", nullable: true, oldClrType: typeof(int), oldType: "integer"); migrationBuilder.AddColumn( name: "ilceid", table: "salon", type: "integer", nullable: true); migrationBuilder.AddForeignKey( name: "FK_salon_il_ilid", table: "salon", column: "ilid", principalTable: "il", principalColumn: "id"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_salon_il_ilid", table: "salon"); migrationBuilder.DropColumn( name: "ilceid", table: "salon"); migrationBuilder.RenameColumn( name: "CepTel", table: "salon", newName: "ceptel"); migrationBuilder.RenameColumn( name: "ilid", table: "salon", newName: "ılıd"); migrationBuilder.RenameColumn( name: "id", table: "salon", newName: "ıd"); migrationBuilder.RenameIndex( name: "IX_salon_ilid", table: "salon", newName: "IX_salon_ılıd"); migrationBuilder.RenameColumn( name: "id", table: "kullanici", newName: "ıd"); migrationBuilder.RenameColumn( name: "id", table: "il", newName: "ıd"); migrationBuilder.AlterColumn( name: "webadres", table: "salon", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "verginumarasi", table: "salon", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "vergidairesi", table: "salon", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "telefon", table: "salon", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "adres", table: "salon", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "character varying(250)", oldMaxLength: 250, oldNullable: true); migrationBuilder.AlterColumn( name: "adi", table: "salon", type: "text", nullable: false, oldClrType: typeof(string), oldType: "character varying(150)", oldMaxLength: 150); migrationBuilder.AlterColumn( name: "ılıd", table: "salon", type: "integer", nullable: false, defaultValue: 0, oldClrType: typeof(int), oldType: "integer", oldNullable: true); migrationBuilder.AddColumn( name: "ılce", table: "salon", type: "integer", nullable: false, defaultValue: 0); migrationBuilder.AddForeignKey( name: "FK_salon_il_ılıd", table: "salon", column: "ılıd", principalTable: "il", principalColumn: "ıd", onDelete: ReferentialAction.Cascade); } } }