Fixed SQL queries so that they accept table names of only digits.#3
Fixed SQL queries so that they accept table names of only digits.#3rwoodbury wants to merge 76 commits intoyvoronoy:masterfrom
Conversation
- Fixed dissagreement between help statement and actual option usage. - Changed handling of configuration file so that values from the config file are always used but are overridden by values from the command line. - The added and commented out code is a start at adding/changing the existing table name prefix. Table prefix handling is incomplete.
|
@rwoodbury wow nice job. Also please consider for m2 project similar tool https://github.com/yvoronoy/m2install |
|
Thanks! Any commentary, including negative, is welcome. I'm concerned I might have missed some behavior you had in mind. I will consider M2 installer but it will have to wait until I start working on M2. ;-) |
|
Sorry for late response @rwoodbury So if I have a dumps, I just run restore.sh it deploy dumps without any additional questions. So I don't wanna think every time how I have to name DB, or what base url should be.
|
|
As far as the parameter handling is concerned I shouldn't have created a pull-request this soon. This should have been separated from the improvements in DB statement handling and done in a separate pull-request. It was suggested by others that I do the pull-request and got caught up in the whole process. Just in case my documentation is unclear: When working from a VirtualBox instance of Ubuntu my manually created "~/.restore.conf" file contains these parameters: After that there is only the need to press 'enter' or 'return' to confirm the default or calculated values which are displayed in square brackets at each "read" statement. Ultimately your use case is what I have in mind with options providing overrides to default values in the same style as the command line I'd like to continue with this when I get the chance. Let me know. |
|
Yeah, my docs weren't clear. I added some of my notes above to the README. |
|
Here's an example of my planned handling of options: Let's say my web root is "/var/www/" and my deployment is in "/var/www/9999/", and this one time I want to use a DB schema name different from the name matching the deployment directory ("9999") or override the name in the config file ("DBNAME"). The command would look like: That's it. Everything else would come from the config file. The script would then output (using the sample config file previously mentioned): I'd probably leave out the "Continue? [YES/no]" confirmation and instead use a dry-run flag. Once a user has gotten used to how it works that one last confirmation will be one too many key strokes. |
…n by multiple readlines.
…sion, 2) commented out separate "code" and "db" modes
… added explicit destination for extracted files, save original version of core_config_data, streamlined checkTools
Tested on Ubuntu 14.04 Server.