Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
8808 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Autore

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

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

Autore

Hope that someone knows a better way =)

Post correlati Risposte Visualizzazioni Attività
1
mag 22
3941
1
ago 19
3899
1
dic 21
6369
0
ott 21
2938
1
ott 21
3733