-
Notifications
You must be signed in to change notification settings - Fork 61
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
Support existing-but-not-initialized databases in init script #62
base: master
Are you sure you want to change the base?
Conversation
08654d4
to
083d8c2
Compare
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.
Could you elaborate your practical use case?
Yes, when booting a new instance, if the database exists but is not initialized, Odoo fails to start. I expected IMHO, within Odoo's mindset a database "exists" if it is present in the server and initialized. I can however change some semantics if you prefer it, adding a |
I'd be more comfortable with that yes, with a test. Thanks! |
083d8c2
to
8eaf3d7
Compare
Done. |
This is still red. |
AFAICS the problem is now the test, right? It's surprised that we can actually initialize a database that already existed, but since we didn't pass |
@yajo, the failing test looks ok to me: if we try initdb on any existing, even uninitialized database, it must fail by default as this is the safest thing to do. |
I'm scratching a lot my head with these flags... 🤔 I think they don't make any sense. Look, this matrix is what we'd got if we continue like this:
The last row is what is missing, and it is the case that I actually need. So, how do you want it implemented? Do I really have to add Under Odoo PoV, a DB that is not initialized is just as useless as if it didn't exist. So, can't we just make this script treat unexisting and uninitialized dbs the same? It'd be the simplest solution AFAICS... |
Still scratching my head too ;) I'm still convinced we need a new option but I'm not sure yet how to name it. |
The script is called |
Since odoo/odoo@cb2862a (v12+), Odoo will not autoinitialize modules in a database that already exists. However, in v8-, Odoo will not start if the database doesn't exist. To make this difference easier to handle, with this change, `click-odoo-initdb` will treat non-existing databases the same as non-initialized ones (which is, for Odoo, the same). @Tecnativa TT20713
8eaf3d7
to
c5d44e9
Compare
Any news on this? |
Since odoo/odoo@cb2862a (v12+), Odoo will not autoinitialize modules in a database that already exists.
However, in v8-, Odoo will not start if the database doesn't exist.
To make this difference easier to handle, with this change,
click-odoo-initdb
will treat non-existing databases the same as non-initialized ones (which is, for Odoo, the same).@Tecnativa TT20713