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

[web_website] fix reinstallation error by adding IF NOT EXISTS #1093

Merged
merged 3 commits into from
Feb 11, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions web_website/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright 2021 Zell Co., Ltd.
# License MIT (https://opensource.org/licenses/MIT).
from . import models

Expand All @@ -8,5 +9,5 @@ def post_init_hook(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})

# emulate updating existing field to website-dependent one
env.cr.execute("ALTER TABLE test_website_dependent ADD COLUMN foo VARCHAR")
env.cr.execute("ALTER TABLE test_website_dependent ADD COLUMN user_id INTEGER")
env.cr.execute("ALTER TABLE test_website_dependent ADD COLUMN IF NOT EXISTS foo VARCHAR")
env.cr.execute("ALTER TABLE test_website_dependent ADD COLUMN IF NOT EXISTS user_id INTEGER")
2 changes: 1 addition & 1 deletion web_website/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"category": "Hidden",
# "live_test_url": "",
"images": [],
"version": "11.0.3.0.5",
"version": "11.0.3.0.6",
"application": False,
"author": "IT-Projects LLC, Ivan Yelizariev",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"support": "[email protected]",
Expand Down
5 changes: 5 additions & 0 deletions web_website/doc/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
`3.0.5`
-------

- **Fix:** reinstallation error by adding IF NOT EXISTS

`3.0.5`
-------
- **Fix:** _get_website_id could return SUPERUSER_ID's website instead of current user
Expand Down