Skip to content

Commit

Permalink
legger til tilleggsinformasjon i dataprodukt
Browse files Browse the repository at this point in the history
  • Loading branch information
ebelegu committed Oct 1, 2024
1 parent 9f2c585 commit 111e252
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,9 @@ class DataproduktModel(
database.nonTransactionalExecuteUpdate(
"""
insert into sak (
sak_id, grupperings_id, produsent_id, merkelapp, tittel, lenke, oppgitt_tidspunkt, mottatt_tidspunkt, soft_deleted_tidspunkt
sak_id, grupperings_id, produsent_id, merkelapp, tittel, tilleggsinformasjon, lenke, oppgitt_tidspunkt, mottatt_tidspunkt, soft_deleted_tidspunkt
)
values (?, ?, ?, ?, ?, ?, ?, ?, ?)
values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
on conflict do nothing
"""
) {
Expand All @@ -410,6 +410,7 @@ class DataproduktModel(
text(hendelse.produsentId)
text(hendelse.merkelapp)
text(hendelse.tittel)
nullableText(hendelse.tilleggsinformasjon)
nullableText(hendelse.lenke)
nullableInstantAsText(hendelse.oppgittTidspunkt?.toInstant())
instantAsText(hendelse.mottattTidspunkt?.toInstant() ?: metadata.timestamp)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
alter table sak
add column tilleggsinformasjon text;

alter table sak
add column tilleggsinformasjon_pseud text generated always as (pseudonymize(tilleggsinformasjon)) stored;

0 comments on commit 111e252

Please sign in to comment.