Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
b Ikke gjør sammenligning av migrering for nye rader i postgres
Browse files Browse the repository at this point in the history
Alle rader som opprinnelig opprettes i postgres har en id større enn 10000000. Disse skal ikke tas med når vi sammenligner data mellom oracle og postgres for å sjekke at migreringsjobben gjør som den skal.
  • Loading branch information
marenger committed Jan 11, 2023
1 parent 657c462 commit f301ec3
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,18 +175,18 @@ class MigrateRepositoryImpl(private val db: NamedParameterJdbcTemplate) : Migrat
private const val brukerReaktiveringSjekkSql = """
select count(*) as antall_rader,
count(distinct aktor_id) as unike_aktor_id
from bruker_reaktivering
from bruker_reaktivering where bruker_reaktivering_id < 10000000
"""

private const val registreringstilstandSjekkSql = """
select count(*) as antall_rader,
count(distinct bruker_registrering_id) as unike_brukerregistrering_id,
floor(avg(bruker_registrering_id)) as gjsnitt_bruker_registrering_id
from registrering_tilstand
from registrering_tilstand where bruker_registrering_id < 10000000
"""
private const val profileringSjekkSql = """
select count(*) as antall_rader, count(distinct verdi) as unike_verdier, count(distinct profilering_type) as unike_typer
from bruker_profilering
from bruker_profilering where bruker_registrering_id < 10000000
"""

private const val brukerRegistreringSjekkSql = """
Expand All @@ -196,7 +196,7 @@ class MigrateRepositoryImpl(private val db: NamedParameterJdbcTemplate) : Migrat
count(distinct jobbhistorikk) as unike_jobbhistorikk,
count(distinct yrkespraksis) as unike_yrkespraksis,
floor(avg(konsept_id)) as gjsnitt_konsept_id
from bruker_registrering
from bruker_registrering where bruker_registrering_id < 10000000
"""

private const val sykmeldtRegistreringSjekkSql = """
Expand All @@ -205,23 +205,25 @@ class MigrateRepositoryImpl(private val db: NamedParameterJdbcTemplate) : Migrat
count(distinct aktor_id) as unike_aktorer,
count(distinct utdanning_bestatt) as unike_utdanning_bestatt,
count(distinct andre_utfordringer) as unike_andre_utfordringer,
round(avg(cast(nus_kode as int)), 2) as gjsnitt_nus from sykmeldt_registrering
round(avg(cast(nus_kode as int)), 2) as gjsnitt_nus
from sykmeldt_registrering where sykmeldt_registrering_id < 10000000
"""

private const val manuellRegistreringSjekkSql = """
select count(*) as antall_rader,
count(distinct veileder_ident) as unike_veiledere,
count(distinct veileder_enhet_id) as unike_enheter,
count(distinct registrering_id) as unike_registreringer,
count(distinct bruker_registrering_type) as unike_reg_typer from manuell_registrering
count(distinct bruker_registrering_type) as unike_reg_typer
from manuell_registrering where manuell_registrering_id < 10000000
"""

private const val oppgaveSjekkSql = """
select count(*) as antall_rader,
count(distinct aktor_id) as unike_aktorer,
count(distinct oppgavetype) as unike_oppgavetyper,
count(distinct ekstern_oppgave_id) as unike_oppgave_id,
floor(avg(ekstern_oppgave_id)) as gjsnitt_oppgave_id from oppgave
floor(avg(ekstern_oppgave_id)) as gjsnitt_oppgave_id from oppgave where id < 10000000
"""

private val registreringTilstandRowMapper: RowMapper<RegistreringTilstand> = RowMapper { rs, _ ->
Expand Down

0 comments on commit f301ec3

Please sign in to comment.