12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- using Microsoft.EntityFrameworkCore.Migrations;
-
- namespace UnivateProperties_API.Migrations
- {
- public partial class PropertyCoordsUpdate : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.AddColumn<string>(
- name: "PropertCoords",
- table: "Properties",
- nullable: true);
-
- migrationBuilder.CreateIndex(
- name: "IX_Properties_PropertyTypeId",
- table: "Properties",
- column: "PropertyTypeId");
-
- migrationBuilder.AddForeignKey(
- name: "FK_Properties_PropertyTypes_PropertyTypeId",
- table: "Properties",
- column: "PropertyTypeId",
- principalTable: "PropertyTypes",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- }
-
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropForeignKey(
- name: "FK_Properties_PropertyTypes_PropertyTypeId",
- table: "Properties");
-
- migrationBuilder.DropIndex(
- name: "IX_Properties_PropertyTypeId",
- table: "Properties");
-
- migrationBuilder.DropColumn(
- name: "PropertCoords",
- table: "Properties");
- }
- }
- }
|