123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- using Microsoft.EntityFrameworkCore.Migrations;
-
- namespace UnivateProperties_API.Migrations
- {
- public partial class PropertyAddressesupdated : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropColumn(
- name: "CityId",
- table: "Properties");
-
- migrationBuilder.DropColumn(
- name: "ProvinceId",
- table: "Properties");
-
- migrationBuilder.DropColumn(
- name: "SuburbId",
- table: "Properties");
-
- migrationBuilder.RenameColumn(
- name: "AddressLine3",
- table: "Properties",
- newName: "Suburb");
-
- migrationBuilder.RenameColumn(
- name: "AddressLine2",
- table: "Properties",
- newName: "StreetNumber");
-
- migrationBuilder.RenameColumn(
- name: "AddressLine1",
- table: "Properties",
- newName: "StreetName");
-
- migrationBuilder.AddColumn<string>(
- name: "AddressOther",
- table: "Properties",
- nullable: true);
-
- migrationBuilder.AddColumn<string>(
- name: "City",
- table: "Properties",
- nullable: true);
-
- migrationBuilder.AddColumn<string>(
- name: "Country",
- table: "Properties",
- nullable: true);
-
- migrationBuilder.AddColumn<string>(
- name: "PostalCode",
- table: "Properties",
- nullable: true);
-
- migrationBuilder.AddColumn<string>(
- name: "Province",
- table: "Properties",
- nullable: true);
- }
-
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropColumn(
- name: "AddressOther",
- table: "Properties");
-
- migrationBuilder.DropColumn(
- name: "City",
- table: "Properties");
-
- migrationBuilder.DropColumn(
- name: "Country",
- table: "Properties");
-
- migrationBuilder.DropColumn(
- name: "PostalCode",
- table: "Properties");
-
- migrationBuilder.DropColumn(
- name: "Province",
- table: "Properties");
-
- migrationBuilder.RenameColumn(
- name: "Suburb",
- table: "Properties",
- newName: "AddressLine3");
-
- migrationBuilder.RenameColumn(
- name: "StreetNumber",
- table: "Properties",
- newName: "AddressLine2");
-
- migrationBuilder.RenameColumn(
- name: "StreetName",
- table: "Properties",
- newName: "AddressLine1");
-
- migrationBuilder.AddColumn<int>(
- name: "CityId",
- table: "Properties",
- nullable: false,
- defaultValue: 0);
-
- migrationBuilder.AddColumn<int>(
- name: "ProvinceId",
- table: "Properties",
- nullable: false,
- defaultValue: 0);
-
- migrationBuilder.AddColumn<int>(
- name: "SuburbId",
- table: "Properties",
- nullable: false,
- defaultValue: 0);
- }
- }
- }
|