Files
DugunSalonu/Migrations/20250809145150_mg7.cs

251 lines
7.5 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 mg7 : Migration
{
/// <inheritdoc />
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<string>(
name: "webadres",
table: "salon",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "verginumarasi",
table: "salon",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "vergidairesi",
table: "salon",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "telefon",
table: "salon",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "adres",
table: "salon",
type: "character varying(250)",
maxLength: 250,
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "adi",
table: "salon",
type: "character varying(150)",
maxLength: 150,
nullable: false,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<int>(
name: "ilid",
table: "salon",
type: "integer",
nullable: true,
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AddColumn<int>(
name: "ilceid",
table: "salon",
type: "integer",
nullable: true);
migrationBuilder.AddForeignKey(
name: "FK_salon_il_ilid",
table: "salon",
column: "ilid",
principalTable: "il",
principalColumn: "id");
}
/// <inheritdoc />
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<string>(
name: "webadres",
table: "salon",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "verginumarasi",
table: "salon",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "vergidairesi",
table: "salon",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "telefon",
table: "salon",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "adres",
table: "salon",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "character varying(250)",
oldMaxLength: 250,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "adi",
table: "salon",
type: "text",
nullable: false,
oldClrType: typeof(string),
oldType: "character varying(150)",
oldMaxLength: 150);
migrationBuilder.AlterColumn<int>(
name: "ılıd",
table: "salon",
type: "integer",
nullable: false,
defaultValue: 0,
oldClrType: typeof(int),
oldType: "integer",
oldNullable: true);
migrationBuilder.AddColumn<int>(
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);
}
}
}