跳至內容
選單
此問題已被標幟
1 回覆
8813 瀏覽次數

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

頭像
捨棄
最佳答案

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] ;

頭像
捨棄
作者

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

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

作者

Hope that someone knows a better way =)

相關帖文 回覆 瀏覽次數 活動
1
5月 22
3941
1
8月 19
3901
1
12月 21
6371
0
10月 21
2939
1
10月 21
3735