-
-
Notifications
You must be signed in to change notification settings - Fork 306
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
[16.0] fatturapa_out Update pre-migrate.py #3915
Conversation
@@ -19,8 +19,9 @@ def migrate(env, version): | |||
""", | |||
(table_name, "%s" % constraint_name), | |||
) | |||
result = env.cr.fetchall() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probabilmente il vincolo wizard_export_fatturapa_report_print_menu_fkey
dopo b32a0b6#diff-914565354eea6151b103fe044fbc59e9406e4df75dd4143da361a2873a4c246e non esisterà più, ma potrebbero esserci dei DB vecchi che lo hanno ancora.
LGTM
|
||
if env.cr.fetchall()[0]: | ||
if result and result[0]: | ||
alter_table_sql = sql.SQL("ALTER TABLE {} DROP CONSTRAINT {}").format( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forse si può semplificare il tutto con
ALTER TABLE wizard_export_fatturapa DROP CONSTRAINT IF EXIST wizard_export_fatturapa_report_print_menu_fkey
.
Così la query precedente manco serve, giusto?
(ho verificato, IF EXIST è stato introdotto in pg 9.0, Odoo 16 richiede minimo 10).
+1 ho lo stesso problema anche io |
@salvorapi approva la PR se risolve :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per me è ok, grazie.
This PR has the |
chiudo in favore di #3696 |
fix issue #3914 (comment)