3 echo pht('Adding secretkeys to legalpad document signatures.')."\n";
5 $table = new LegalpadDocumentSignature();
6 $conn_w = $table->establishConnection('w');
7 $iterator = new LiskMigrationIterator($table);
8 foreach ($iterator as $sig) {
11 echo pht('Populating signature %d...', $id)."\n";
13 if (!$sig->getSecretKey()) {
16 'UPDATE %T SET secretKey = %s WHERE id = %d',
17 $table->getTableName(),
18 Filesystem
::readRandomCharacters(20),
23 echo pht('Done.')."\n";