1
0
Fork 0
mirror of synced 2024-05-20 20:52:36 +12:00

adapt to review

This commit is contained in:
Torsten Dittmann 2021-12-13 11:59:13 +01:00
parent ea7d9f617c
commit 361006d42c
2 changed files with 10 additions and 3 deletions

View file

@ -25,7 +25,9 @@ $cli
}
$options = [];
if (str_starts_with($version, '0.12.')) {
Console::error('--------------------');
Console::error('WARNING');
Console::error('--------------------');
Console::warning('Migrating to Version 0.12.x introduces a major breaking change within the Database Service!');
Console::warning('Before migrating, please read about the breaking changes here:');
Console::info('https://appwrite.io/guide-to-db-migration');
@ -41,6 +43,7 @@ $cli
Console::warning('Be aware that following actions will happen during the migration:');
Console::warning('- Nested Document rules will be migrated to String attributes');
Console::warning('- Numeric rules will be migrated to float attributes');
Console::warning('- Wildcard and Markdown rules will be converted to string attributes');
Console::info("Do you want to migrate your Database Collections?");
$options['migrateCollections'] = Console::confirm("Type 'yes' or 'no':");
@ -51,6 +54,7 @@ $cli
Console::warning('Be aware that following actions will happen during the migration:');
Console::warning('- Nested Documents will be stored as JSON values');
Console::warning('- All Numeric values will be converted to float');
Console::warning('- All Wildcard and Markdown values will be converted to string');
Console::info("Do you want to migrate your Database Documents?");
$options['migrateDocuments'] = Console::confirm("Type 'yes' or 'no':");
} else {

View file

@ -71,13 +71,16 @@ abstract class Migration
/**
* Migration constructor.
*
* @param PDO $pdo
* @param PDO $db
* @param Redis|null $cache
* @param array $options
* @return void
*/
public function __construct(PDO $db, Redis $cache = null, array $options = [])
{
$this->options = $options;
$this->db = $db;
if(!is_null($cache)) {
if (!is_null($cache)) {
$this->cache = $cache;
}
}
@ -166,7 +169,7 @@ abstract class Migration
* @param array $array2
* @return array
*/
public function check_diff_multi(array $array1, array $array2)
public function check_diff_multi(array $array1, array $array2): array
{
$result = array();