[trunk] Sequence refactoring mucks up existing sequences

Bug #868495 reported by John B
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Invalid
Undecided
Unassigned

Bug Description

Submitting as a bug, though it may be better as a question re: migrating existing sequences.

We're testing the latest updates and it looks the the sequence refactoring has caused an issue with existing sequences. Specifically, it looks like all sequence 'implementation' are set to 'standard'. For existing sequences, this causes an error when it looks for the table ir_sequence_XXX, e.g:

 Programming error: relation "ir_sequence_030" does not exist
 LINE 1: SELECT nextval('ir_sequence_030')

As a workaround, I've set all existing sequences to no_gap instead of standard. I'm not sure this is correct, though.

Thanks.

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello John,

I have checked your bug report in that you have specified following error.

 Programming error: relation "ir_sequence_030" does not exist
 LINE 1: SELECT nextval('ir_sequence_030')

But at my end I am not able to reproduce this so would you please provide precious steps on this and provide the more information on this.

Thanks and waiting for your reply!

Changed in openobject-server:
status: New → Incomplete
Revision history for this message
John B (johnb-ca) wrote :

Sorry, to expand on the above:

The issue occurs when upgrading from a version of trunk prior to the refactoring of the sequences. Previously, ir_sequence didn't have the field/column 'implementation'. The default for that field is 'standard', so when migrating it adds the column as 'standard'. The issue is that this causes it to look in another table, ir_sequence_xxx (where xxx is the sequence id) when generating the next in sequence. Because the sequences were created prior to the refactoring, the table doesn't exist.

The workaround is to manually update all sequences to implementation = no_gap.

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello John,

Thanks for your reply!

But this is not a bug it's your migration issue so we are not considering this.

For this type of issue If you have a maintenance contract with us then you can contact our OPW team at <email address hidden> thy will definitely help you.

Thanks.

Changed in openobject-server:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.