Files
DugunSalonu/Migrations/20250808092203_mig6.cs
2025-08-08 12:31:51 +03:00

272 lines
8.1 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace DugunSalonu.Migrations
{
/// <inheritdoc />
public partial class mig6 : Migration
{
/// <inheritdoc />
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<string>(
name: "soyadi",
table: "kullanici",
type: "character varying(50)",
maxLength: 50,
nullable: false,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "eposta",
table: "kullanici",
type: "character varying(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "ceptel",
table: "kullanici",
type: "character varying(10)",
maxLength: 10,
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(10)",
oldMaxLength: 10);
migrationBuilder.AlterColumn<string>(
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);
}
/// <inheritdoc />
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<string>(
name: "mail",
table: "salon",
type: "text",
nullable: false,
defaultValue: "");
migrationBuilder.AlterColumn<string>(
name: "Soyadi",
table: "kullanici",
type: "text",
nullable: false,
oldClrType: typeof(string),
oldType: "character varying(50)",
oldMaxLength: 50);
migrationBuilder.AlterColumn<string>(
name: "Eposta",
table: "kullanici",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "character varying(50)",
oldMaxLength: 50,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
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<string>(
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);
}
}
}