Skip to content

[ADD] Database command to change database parameters without starting it#107

Draft
brinkflew wants to merge 1 commit intomainfrom
avs-command-db
Draft

[ADD] Database command to change database parameters without starting it#107
brinkflew wants to merge 1 commit intomainfrom
avs-command-db

Conversation

@brinkflew
Copy link
Contributor

Description

Allow changing states and parameters of a local database without running it:

  • change or remove linked worktree
  • change or remove linked virtual environment
  • change or remove linked repository
  • (un)whitelist

Linked Issues

Compliance

  • I have read the contribution guide
  • I made sure the documentation is up-to-date both in doctrings and the docs directory
  • I have added or modified unit tests where necessary
  • I have added new libraries to the requirements.txt file, if any
  • I have incremented the version number according the versioning guide
  • The PR contains my changes only and no other external commit

Allow change states and parameters of a local database without
running it:

- change or remove linked worktree
- change or remove linked virtual environment
- change or remove linked repository
- (un)whitelist
@brinkflew brinkflew self-assigned this Nov 18, 2025
@brinkflew brinkflew added the enhancement New feature or request label Nov 18, 2025
@brinkflew brinkflew requested a review from a team November 18, 2025 17:52
Copy link
Contributor

@lse-odoo lse-odoo left a comment

Choose a reason for hiding this comment

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

functionallity speacking, would it make sense to also have a command to get the actual current data ? for example giving:
odev database test repository
would give the current directory while:
odev database test repository "lse-odoo/repository"
would set its value

@brinkflew
Copy link
Contributor Author

functionallity speacking, would it make sense to also have a command to get the actual current data ? for example giving: odev database test repository would give the current directory while: odev database test repository "lse-odoo/repository" would set its value

So more like the odev config command, that could indeed make sense but I'm afraid this would be too much of a duplicate with odev info and odev ls that already prints those. Maybe the best would be to edit odev info so it could set values and not only print them, but some of those won't be editable and I'm not sure how to make that clear a field can or cannot be changed...

@lse-odoo
Copy link
Contributor

functionallity speacking, would it make sense to also have a command to get the actual current data ? for example giving: odev database test repository would give the current directory while: odev database test repository "lse-odoo/repository" would set its value

So more like the odev config command, that could indeed make sense but I'm afraid this would be too much of a duplicate with odev info and odev ls that already prints those. Maybe the best would be to edit odev info so it could set values and not only print them, but some of those won't be editable and I'm not sure how to make that clear a field can or cannot be changed...

I feel like it's becoming more and more complicated personally. The more command we add, the more the complexity it gets. The ideas are good in themselves, but I guess it can become complicate for a new comers.
It's arguable if odev ls or having odev database --list would make more sense for instance. odev info can work without having the database locally so is a bit different, but it could be interesting to have kind of like aliases (to avoid dropping "old" commands). For example the odev database --list command mentioned before (that internally would just call odev ls. We could also have odev database blabla.odoo.com --info (or without --info) that would word like odev info but here we knows that the database is locally restored.

I am also wondering if "database" command name should be rather rename "local-database" as here all commands make sense only for database installed locally, it might avoid ambiguity on the scope of the action.

In the long term I feel that having "group" of commands might make sense in odev to avoid having 10 000 commands listed in help and have a better separation of the "category" of commands (even if it would be arguable in which category belongs which command). This would make sense with plugin in my opinion as generally they include commands for a given scope/category. Here for example being in the group "local-database" so that any odev command have to be prefixed with "local-database" before calling the real command "info, list, etc." could make sense

@brinkflew brinkflew marked this pull request as draft December 22, 2025 08:51
@brinkflew brinkflew changed the base branch from main to beta December 22, 2025 08:51
Base automatically changed from beta to main January 28, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Impossible to link database and repository

2 participants