Skip to content

Commit 0c57293

Browse files
committed
Remove duplicate propertySnapshots table creation in newMigration.cs
1 parent cecaeed commit 0c57293

1 file changed

Lines changed: 0 additions & 57 deletions

File tree

sakenny/Migrations/20250802114315_newMigration.cs

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -444,63 +444,6 @@ protected override void Up(MigrationBuilder migrationBuilder)
444444
onDelete: ReferentialAction.Cascade);
445445
});
446446

447-
migrationBuilder.CreateTable(
448-
name: "propertySnapshots",
449-
columns: table => new
450-
{
451-
Id = table.Column<int>(type: "int", nullable: false)
452-
.Annotation("SqlServer:Identity", "1, 1"),
453-
PropertyId = table.Column<int>(type: "int", nullable: true),
454-
PropertyPermitId = table.Column<int>(type: "int", nullable: false),
455-
CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
456-
Title = table.Column<string>(type: "nvarchar(max)", nullable: false),
457-
Description = table.Column<string>(type: "nvarchar(max)", nullable: false),
458-
PropertyTypeId = table.Column<int>(type: "int", nullable: false),
459-
Country = table.Column<string>(type: "nvarchar(max)", nullable: false),
460-
City = table.Column<string>(type: "nvarchar(max)", nullable: false),
461-
District = table.Column<string>(type: "nvarchar(max)", nullable: false),
462-
BuildingNo = table.Column<int>(type: "int", nullable: false),
463-
Level = table.Column<int>(type: "int", nullable: true),
464-
FlatNo = table.Column<int>(type: "int", nullable: true),
465-
Longitude = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
466-
Latitude = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
467-
RoomCount = table.Column<int>(type: "int", nullable: false),
468-
BathroomCount = table.Column<int>(type: "int", nullable: false),
469-
Space = table.Column<double>(type: "float", nullable: false),
470-
Price = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
471-
PeopleCapacity = table.Column<int>(type: "int", nullable: false),
472-
IsDeleted = table.Column<bool>(type: "bit", nullable: false),
473-
UserId = table.Column<string>(type: "nvarchar(450)", nullable: false),
474-
MainImageUrl = table.Column<string>(type: "nvarchar(max)", nullable: false)
475-
},
476-
constraints: table =>
477-
{
478-
table.PrimaryKey("PK_propertySnapshots", x => x.Id);
479-
table.ForeignKey(
480-
name: "FK_propertySnapshots_AspNetUsers_UserId",
481-
column: x => x.UserId,
482-
principalTable: "AspNetUsers",
483-
principalColumn: "Id",
484-
onDelete: ReferentialAction.Cascade);
485-
table.ForeignKey(
486-
name: "FK_propertySnapshots_Properties_PropertyId",
487-
column: x => x.PropertyId,
488-
principalTable: "Properties",
489-
principalColumn: "Id");
490-
table.ForeignKey(
491-
name: "FK_propertySnapshots_PropertyPermits_PropertyPermitId",
492-
column: x => x.PropertyPermitId,
493-
principalTable: "PropertyPermits",
494-
principalColumn: "id",
495-
onDelete: ReferentialAction.Cascade);
496-
table.ForeignKey(
497-
name: "FK_propertySnapshots_PropertyTypes_PropertyTypeId",
498-
column: x => x.PropertyTypeId,
499-
principalTable: "PropertyTypes",
500-
principalColumn: "Id",
501-
onDelete: ReferentialAction.Cascade);
502-
});
503-
504447
migrationBuilder.CreateTable(
505448
name: "PropertySnapshotService",
506449
columns: table => new

0 commit comments

Comments
 (0)