using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace DugunSalonu.Migrations
{
///
public partial class mig6 : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_salon_il_IlId",
table: "salon");
migrationBuilder.DropColumn(
name: "mail",
table: "salon");
migrationBuilder.RenameColumn(
name: "ilce",
table: "salon",
newName: "ılce");
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: "Soyadi",
table: "kullanici",
newName: "soyadi");
migrationBuilder.RenameColumn(
name: "Parola",
table: "kullanici",
newName: "parola");
migrationBuilder.RenameColumn(
name: "KullaniciAdi",
table: "kullanici",
newName: "kullaniciadi");
migrationBuilder.RenameColumn(
name: "Eposta",
table: "kullanici",
newName: "eposta");
migrationBuilder.RenameColumn(
name: "CepTel",
table: "kullanici",
newName: "ceptel");
migrationBuilder.RenameColumn(
name: "Aktif",
table: "kullanici",
newName: "aktif");
migrationBuilder.RenameColumn(
name: "Admin",
table: "kullanici",
newName: "admin");
migrationBuilder.RenameColumn(
name: "Adi",
table: "kullanici",
newName: "adi");
migrationBuilder.RenameColumn(
name: "Id",
table: "kullanici",
newName: "ıd");
migrationBuilder.RenameColumn(
name: "id",
table: "il",
newName: "ıd");
migrationBuilder.AlterColumn(
name: "soyadi",
table: "kullanici",
type: "character varying(50)",
maxLength: 50,
nullable: false,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn(
name: "eposta",
table: "kullanici",
type: "character varying(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn(
name: "ceptel",
table: "kullanici",
type: "character varying(10)",
maxLength: 10,
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(10)",
oldMaxLength: 10);
migrationBuilder.AlterColumn(
name: "adi",
table: "kullanici",
type: "character varying(50)",
maxLength: 50,
nullable: false,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AddForeignKey(
name: "FK_salon_il_ılıd",
table: "salon",
column: "ılıd",
principalTable: "il",
principalColumn: "ıd",
onDelete: ReferentialAction.Cascade);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_salon_il_ılıd",
table: "salon");
migrationBuilder.RenameColumn(
name: "ılıd",
table: "salon",
newName: "IlId");
migrationBuilder.RenameColumn(
name: "ılce",
table: "salon",
newName: "ilce");
migrationBuilder.RenameColumn(
name: "ıd",
table: "salon",
newName: "Id");
migrationBuilder.RenameIndex(
name: "IX_salon_ılıd",
table: "salon",
newName: "IX_salon_IlId");
migrationBuilder.RenameColumn(
name: "soyadi",
table: "kullanici",
newName: "Soyadi");
migrationBuilder.RenameColumn(
name: "parola",
table: "kullanici",
newName: "Parola");
migrationBuilder.RenameColumn(
name: "kullaniciadi",
table: "kullanici",
newName: "KullaniciAdi");
migrationBuilder.RenameColumn(
name: "eposta",
table: "kullanici",
newName: "Eposta");
migrationBuilder.RenameColumn(
name: "ceptel",
table: "kullanici",
newName: "CepTel");
migrationBuilder.RenameColumn(
name: "aktif",
table: "kullanici",
newName: "Aktif");
migrationBuilder.RenameColumn(
name: "admin",
table: "kullanici",
newName: "Admin");
migrationBuilder.RenameColumn(
name: "adi",
table: "kullanici",
newName: "Adi");
migrationBuilder.RenameColumn(
name: "ıd",
table: "kullanici",
newName: "Id");
migrationBuilder.RenameColumn(
name: "ıd",
table: "il",
newName: "id");
migrationBuilder.AddColumn(
name: "mail",
table: "salon",
type: "text",
nullable: false,
defaultValue: "");
migrationBuilder.AlterColumn(
name: "Soyadi",
table: "kullanici",
type: "text",
nullable: false,
oldClrType: typeof(string),
oldType: "character varying(50)",
oldMaxLength: 50);
migrationBuilder.AlterColumn(
name: "Eposta",
table: "kullanici",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "character varying(50)",
oldMaxLength: 50,
oldNullable: true);
migrationBuilder.AlterColumn(
name: "CepTel",
table: "kullanici",
type: "character varying(10)",
maxLength: 10,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "character varying(10)",
oldMaxLength: 10,
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Adi",
table: "kullanici",
type: "text",
nullable: false,
oldClrType: typeof(string),
oldType: "character varying(50)",
oldMaxLength: 50);
migrationBuilder.AddForeignKey(
name: "FK_salon_il_IlId",
table: "salon",
column: "IlId",
principalTable: "il",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
}
}
}