Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
8844 Weergaven

Hi,

I created a new module that add a new field "user_last_change_state" to the object "account.invouce", and I've done some code with this field.

I needed that older records to have this field equal to 1 (admin id ).

Someone knows how to set the new data field with a default value to existent records?

Thanks

Avatar
Annuleer
Beste antwoord

The simplest form is to do it from a sql script in postgresql. If you have linux, you could do it using pgadmin3 software. The script will be like this: UPDATE [file] SET [field] = 'value' WHERE [condition] ;

Avatar
Annuleer
Auteur

I did that... but it this the best way ?

I my experience yes.... but maybe there's something better.

Auteur

Hope that someone knows a better way =)

Gerelateerde posts Antwoorden Weergaven Activiteit
1
mei 22
3954
1
aug. 19
3904
1
dec. 21
6378
0
okt. 21
2946
1
okt. 21
3749