-
-
Notifications
You must be signed in to change notification settings - Fork 696
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4011 from duong77476/v16_mig_google_calendar1
[16.0][OU-ADD] google_calendar: Migration Done
- Loading branch information
Showing
3 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
openupgrade_scripts/scripts/google_calendar/16.0.1.0/pre-migration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from openupgradelib import openupgrade | ||
|
||
_field_renames = [ | ||
("res.users", "res_users", "google_cal_account_id", "google_calendar_account_id"), | ||
] | ||
|
||
|
||
@openupgrade.migrate() | ||
def migrate(env, version): | ||
openupgrade.rename_fields(env, _field_renames) | ||
openupgrade.delete_sql_constraint_safely( | ||
env, "google_calendar", "res_users", "google_token_uniq" | ||
) |
14 changes: 14 additions & 0 deletions
14
openupgrade_scripts/scripts/google_calendar/16.0.1.0/upgrade_analysis_work.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
---Models in module 'google_calendar'--- | ||
---Fields in module 'google_calendar'--- | ||
google_calendar / res.users / google_cal_account_id (many2one): DEL relation: google.calendar.credentials | ||
google_calendar / res.users / google_calendar_account_id (many2one): NEW relation: google.calendar.credentials | ||
# DONE pre-migration: rename google_cal_account_id -> google_calendar_account_id | ||
|
||
---XML records in module 'google_calendar'--- | ||
ir.model.constraint: google_calendar.constraint_res_users_google_token_uniq (changed definition: is now 'unique(google_calendar_account_id)' ('unique(google_cal_account_id)')) | ||
# DONE pre-migration: safely delete constraint to recreate it | ||
|
||
NEW ir.rule: google_calendar.google_calendar_not_own_token_rule (noupdate) | ||
NEW ir.rule: google_calendar.google_calendar_own_token_rule (noupdate) | ||
NEW ir.rule: google_calendar.google_calendar_token_system_access (noupdate) | ||
# NOTHING TO DO |