Skip to content

Commit

Permalink
Merge pull request #4011 from duong77476/v16_mig_google_calendar1
Browse files Browse the repository at this point in the history
[16.0][OU-ADD] google_calendar: Migration Done
  • Loading branch information
MiquelRForgeFlow authored Jul 5, 2023
2 parents 32063d2 + 8459bef commit 84fa166
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docsource/modules150-160.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Module coverage 15.0 -> 16.0
+-------------------------------------------------+----------------------+-------------------------------------------------+
| google_account |Done | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
| google_calendar | | |
| google_calendar |Done | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
| |del| google_drive | | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
Expand Down
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"
)
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

0 comments on commit 84fa166

Please sign in to comment.