Skip to content

Commit 40bc9e3

Browse files
author
Gaetano Giunta
committed
docs
1 parent 816e874 commit 40bc9e3

File tree

3 files changed

+23
-15
lines changed

3 files changed

+23
-15
lines changed

TODO.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
- improve handling of character sets:
2-
+ make sure we always create utf8 databases
3-
+ make sure we always get back by default utf8 data from the clients
4-
51
- worker: improve sql execution cmd:
62
+ allow it to pick an existing db/user
7-
+ disallow execution of commands that are part of the db client instead of being sent to the server, such as eg. 'use db'
8-
- ok for mysql? (to be tested)
9-
- missing for psql? (according to slack discussion: this is impossible using psql and can only be done using a different
10-
driver... it might be in fact already happening when NOT using input via files...)
11-
- missing for sqlsrv
123
+ examine in detail and document the differences between running a command vs a file (eg. transaction usage)
13-
+ check: can the temp user drop&creates other databases for postgresql?
4+
5+
- improve handling of character sets:
6+
+ make sure we always create utf8 databases
7+
+ make sure we always get back by default utf8 data from the clients
148

159
- improve cli scripts:
1610
+ add a 'stack' script that simplifies building the stack and logging into it
@@ -26,7 +20,19 @@
2620

2721
- add travis testing
2822

29-
- worker: improve profile of 'db3v4l' account (esp: add APP_ENV and APP_DEBUG env vars; start in correct dir automatically)
23+
- worker: sanitize sql execution cmd:
24+
+ disallow execution of commands that are part of the db client instead of being sent to the server, such as eg. 'use db'
25+
- ok for mysql? (to be tested)
26+
- missing for psql? (according to slack discussion: this is impossible using psql and can only be done using a different
27+
driver... it might be in fact already happening when NOT using input via files...)
28+
- missing for sqlsrv
29+
+ check: can the temp user drop&creates other databases for postgresql?
30+
31+
- worker: improve profile of 'db3v4l' account
32+
+ esp: add APP_ENV and APP_DEBUG env vars
33+
+ start in correct dir automatically
34+
+ enable `ll` and `la` shell aliases
35+
+ use a colored shell prompt
3036

3137
- worker+web: add a queued-task implementation, using sf messenger and a db
3238

WHATSNEW.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ Version 0.6
33

44
- New: added SQLite 3.27
55

6-
- Improved: sort database names when listing them (except for MySQL and MariaDB)
7-
86
- Fixed: the number of total failures was not computed correctly when executing SQL if the failure was in the creation
97
of the temporary database
108

9+
- Improved: sort database names when listing them (except for MySQL and MariaDB)
1110

1211
Version 0.5
1312
-----------

app/src/Command/DatabaseCreate.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ protected function configure()
1616
$this
1717
->setDescription('Creates a user+database in parallel on all configured database instances')
1818
->addOption('user', null, InputOption::VALUE_REQUIRED, 'The name of the user to create')
19-
->addOption('password', null, InputOption::VALUE_REQUIRED, 'The password')
19+
->addOption('password', null, InputOption::VALUE_REQUIRED, 'The password. If omitted, a random one will be generated and echoed to stderr')
2020
->addOption('database', null, InputOption::VALUE_REQUIRED, 'The name of the database. If omitted, the user name will be used as database name')
2121
->addCommonOptions()
2222
;
@@ -54,9 +54,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
5454
throw new \Exception("Please provide a username");
5555
}
5656

57-
/// @todo warn the user...
5857
if ($password == null) {
5958
$password = bin2hex(random_bytes(16));
59+
60+
// Should we warn the user always? To avoid breaking non-text-format, we can send it to stderr...
61+
// Otoh we give the password in the structured output that we produce
62+
//$this->writeErrorln("<info>Assigned password to the user: $password</info>");
6063
}
6164

6265
// On Debian, which we use by default, SF has troubles understanding that php was compiled with --enable-sigchild

0 commit comments

Comments
 (0)