fix: update migration timestamp and correct city IDs in data seeder

- Update EF Core migration history timestamp from 20260608225159 to 20260608225845
- Fix CityId values in Complex seed data to use new composite format (provinceId*100+cityId)
  - Tehran: 1 → 801 (provinceId=8, cityId=1)
  - Isfahan: 3 → 401 (provinceId=4, cityId=1)
This commit is contained in:
2026-06-09 02:45:46 +03:30
parent 0e1b0345ec
commit adcee56ce8
2 changed files with 4 additions and 4 deletions

View File

@@ -200,8 +200,8 @@ using (var scope = app.Services.CreateScope())
"BEGIN " + "BEGIN " +
"CREATE TABLE [__EFMigrationsHistory] ([MigrationId] nvarchar(150) NOT NULL, [ProductVersion] nvarchar(32) NOT NULL, PRIMARY KEY ([MigrationId])); " + "CREATE TABLE [__EFMigrationsHistory] ([MigrationId] nvarchar(150) NOT NULL, [ProductVersion] nvarchar(32) NOT NULL, PRIMARY KEY ([MigrationId])); " +
"END " + "END " +
"IF NOT EXISTS (SELECT * FROM __EFMigrationsHistory WHERE MigrationId = '20260608225159_InitialCreate') " + "IF NOT EXISTS (SELECT * FROM __EFMigrationsHistory WHERE MigrationId = '20260608225845_InitialCreate') " +
"INSERT INTO __EFMigrationsHistory (MigrationId, ProductVersion) VALUES ('20260608225159_InitialCreate', '6.0.3')"); "INSERT INTO __EFMigrationsHistory (MigrationId, ProductVersion) VALUES ('20260608225845_InitialCreate', '6.0.3')");
} }
} }
catch catch

View File

@@ -98,7 +98,7 @@ namespace Complex.Infrastructure
Id = complexId1, Id = complexId1,
Title = "مجتمع بهاران", Title = "مجتمع بهاران",
Address = "تهران، خیابان ولیعصر، نبش کوچه بهار", Address = "تهران، خیابان ولیعصر، نبش کوچه بهار",
CityId = 1, // Tehran CityId = 801, // Tehran (provinceId=8, cityId=8*100+1)
AreaMeter = 2000, AreaMeter = 2000,
YardMeter = 500, YardMeter = 500,
ElevatorCount = 2, ElevatorCount = 2,
@@ -111,7 +111,7 @@ namespace Complex.Infrastructure
Id = complexId2, Id = complexId2,
Title = "مجتمع ساحل", Title = "مجتمع ساحل",
Address = "اصفهان، خیابان چهارباغ، روبروی پارک ساحل", Address = "اصفهان، خیابان چهارباغ، روبروی پارک ساحل",
CityId = 3, // Isfahan CityId = 401, // Isfahan (provinceId=4, cityId=4*100+1)
AreaMeter = 1500, AreaMeter = 1500,
YardMeter = 300, YardMeter = 300,
ElevatorCount = 1, ElevatorCount = 1,