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

Improve DB naming #54

Merged
merged 2 commits into from
Jun 25, 2019
Merged

Improve DB naming #54

merged 2 commits into from
Jun 25, 2019

Conversation

totten
Copy link
Collaborator

@totten totten commented Jun 21, 2019

  • When looking at the folder structure to pick a "hint" word, ignore trailing web/ or htdocs/.
    • Ex: For /var/www/dmaster/web, the civi DB will be dmastercivi_12345 instead of webcivi_12345.
  • Allow the DB name to be longer (Allow longer database names #51).
    • Ex: For /var/www/dmaster, the civi DB wil be dmastercivi_12345 instead of dmasterciv_12345 (missing i).

The naming convention for databases is based on the folder-naming -- i.e.
the folder-name is a "hint" that becomes the start of the DB name.

However, in a file-naming structure like the following, all the folders produce the same "hint":

* `/var/www/foo/web`
* `/var/www/bar/web`
* `/var/www/whiz/web`
* `/var/www/bang/web`

This patch changes the hinting formula to disregard common endings (`/web`,
`/htdocs`, `/www`).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant