Closed RobertCzaja closed 2 weeks ago
pl.api.itoffers.offer.application.service.OfferService#processOffersFromExternalService
? or in Offer Entity) if few the same EmploymentType within on Offer is not saved to DB - it should rise an Exception - That task has been split to new Ticket (https://github.com/RobertCzaja/it-offers/issues/48)Split to tickets that can be done in the next steps:
Fin out why that MongoDB query doesn't find related JJITOffers for a lot o Postgres Offers
@Query("{ $and: [ { \"offer.title\": ?0, \"offer.slug\": ?1, \"offer.companyName\": ?2, \"offer.publishedAt\": ?3} ] }")
List<JustJoinItRawOffer> findDuplicatedOffers(String title, String slug, String companyName, String publishedAt);
Because publishedAt dateTime was filled incorrectly
To fix in: https://github.com/RobertCzaja/it-offers/issues/52
Migration
2024-10-12T10:57:22.607Z INFO 1 --- [it-offers] [ main] o.u.c.MigrateOfferSalariesToNewFormatCli : Processed offers: 1000
2024-10-12T10:57:22.607Z INFO 1 --- [it-offers] [ main] o.u.c.MigrateOfferSalariesToNewFormatCli : Migrated offers: 537
2024-10-12T10:57:22.607Z INFO 1 --- [it-offers] [ main] o.u.c.MigrateOfferSalariesToNewFormatCli : Empty salaries: 462
2024-10-12T10:59:34.376Z INFO 1 --- [it-offers] [ main] o.u.c.MigrateOfferSalariesToNewFormatCli : Processed offers: 1000
2024-10-12T10:59:34.376Z INFO 1 --- [it-offers] [ main] o.u.c.MigrateOfferSalariesToNewFormatCli : Migrated offers: 332
2024-10-12T10:59:34.376Z INFO 1 --- [it-offers] [ main] o.u.c.MigrateOfferSalariesToNewFormatCli : Empty salaries: 667
2024-10-12T11:04:38.409Z INFO 1 --- [it-offers] [ main] o.u.c.MigrateOfferSalariesToNewFormatCli : Processed offers: 3377
2024-10-12T11:04:38.409Z INFO 1 --- [it-offers] [ main] o.u.c.MigrateOfferSalariesToNewFormatCli : Migrated offers: 1003
2024-10-12T11:04:38.409Z INFO 1 --- [it-offers] [ main] o.u.c.MigrateOfferSalariesToNewFormatCli : Empty salaries: 2374
2024-10-12T11:08:16.219Z INFO 1 --- [it-offers] [ main] o.u.c.MigrateOfferSalariesToNewFormatCli : Processed offers: 2374
2024-10-12T11:08:16.219Z INFO 1 --- [it-offers] [ main] o.u.c.MigrateOfferSalariesToNewFormatCli : Migrated offers: 0
2024-10-12T11:08:16.219Z INFO 1 --- [it-offers] [ main] o.u.c.MigrateOfferSalariesToNewFormatCli : Empty salaries: 2374
2024-10-12T11:11:37.521Z INFO 1 --- [it-offers] [ main] o.u.c.MigrateOfferSalariesToNewFormatCli : Processed offers: 2374
2024-10-12T11:11:37.521Z INFO 1 --- [it-offers] [ main] o.u.c.MigrateOfferSalariesToNewFormatCli : Migrated offers: 0
2024-10-12T11:11:37.521Z INFO 1 --- [it-offers] [ main] o.u.c.MigrateOfferSalariesToNewFormatCli : Empty salaries: 2374
🟢 All Salaries successfully migrated 🟢
done
I've got that data in MongoDB. When there is no salary in PLN - just save null or recalculate it based on curse from external service.
Create new table
salary
with columns:✅ Start saving salary in the new table (always stor PLN and in original currency) ✅ supposed to save only one isOriginal record for on OfferId
✅ Migrate to new salary structure all already saved Offers (added before adding that one)
✅ Start using new salary structure all over the repo 6.✅ Remove old salary fields from Offer entity
✅ Remove old salary columns from db
offer
table (salary_*)