Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
6795 Lượt xem

I'm thinking advance in time. I'm developing a module, and there are some fields of a custom object whose type isn't really narrowed by the time. I'm using some kind of "loose" type (say, text types) for things that in the future may result to be selections or another type (the use experience will tell what's the best).

How do you manage such changes? How does OpenERP cope with making a change like this? Does any extra step need to be done for updating the database?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Don't do that. You have to set your fields type before using it. I'm going to explain you why.

When you change the type of a field OpenERP automatically s going to create a new column on the database and the other column is going to be called name_moved or something like this. Even if you change between float to char.

Maybe you can make a SQL query that move all the data from the old column to the new one, but you have to do it manually.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 7 18
8360
1
thg 7 16
4615
4
thg 12 23
36584
1
thg 4 25
1066
1
thg 7 23
2928