Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE] Updating to new version problem creating new constrains. #67

Open
nhomar opened this issue Apr 15, 2016 · 1 comment
Open

[ISSUE] Updating to new version problem creating new constrains. #67

nhomar opened this issue Apr 15, 2016 · 1 comment

Comments

@nhomar
Copy link
Member

nhomar commented Apr 15, 2016

Hello.

What I did.

git pull.
-u ifrs_report -d bd-

And this error appear:

ALTER TABLE "ifrs_lines" ADD CONSTRAINT "ifrs_lines_sequence_ifrs_id_unique" unique(sequence, ifrs_id); 

Is impossible to execute due to records 
(sequence, ifrs_id)=(420, 16)

Are duplicated.

What I expect.

Update from 8.0 -> 8.0 being properly done with no errors on existent databases.

Recomendation:

Can you dedicate a little to bump the version properly in the module and reveiw first if a record is duplicated when you add a new SQL contraint in an stable version?

HOW:

You can use this approach with the migration api.

  1. In a folder called migration.

  1. Put the init scripts that should be executed BEFORE update. (pure SQL).

The number of the version should be the same than the one in openerp.py.

Recommendation:

  1. Look for elements which are duplicated.
  2. Set a title to them that force them to be reviewed checking if there is a GAP in the priority that allo simply bump a number in the priority.

For example:

If you find ifrs_id = 10 priority 10 twice.... then set to 11 the priority field and recheck until an spece is found. and mark with simple text the title.

Thanks.

PS: You can use this migration approach between 8 and 9 but it is a different topic.

@nhomar
Copy link
Member Author

nhomar commented Apr 15, 2016

This is the referenced module in the images:

https://github.com/OCA/l10n-spain/tree/9.0/l10n_es

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant