utopia-php / migration
A simple library to migrate resources between services.
Installs: 29 586
Dependents: 1
Suggesters: 0
Security: 0
Stars: 3
Watchers: 6
Forks: 1
Open Issues: 1
Requires
- php: 8.3.*
- ext-curl: *
- ext-openssl: *
- appwrite/appwrite: 11.1.*
- utopia-php/database: 0.55.*
- utopia-php/dsn: 0.2.*
- utopia-php/storage: 0.19.*
Requires (Dev)
- ext-pdo: *
- laravel/pint: 1.17.*
- phpstan/phpstan: 1.11.*
- phpunit/phpunit: 11.2.*
- utopia-php/cli: 0.19.*
- vlucas/phpdotenv: 5.6.*
- dev-main
- 0.7.0
- 0.6.x-dev
- 0.6.12
- 0.6.11
- 0.6.10
- 0.6.9
- 0.6.8
- 0.6.7
- 0.6.6
- 0.6.5
- 0.6.4
- 0.6.3
- 0.6.2
- 0.6.1
- 0.6.0
- 0.5.x-dev
- 0.5.3
- 0.5.2
- 0.5.1
- 0.5.0
- 0.4.4
- 0.4.3
- 0.4.2
- 0.4.1
- 0.4.0
- 0.3.6
- 0.3.5
- 0.3.4
- 0.3.3
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.0
- 0.1.0
- dev-0.6.x-index-validation
- dev-fix-various-auth-bugs
- dev-original-uid
- dev-backups-v2
- dev-feat-dependencies
- dev-feat-add-appwrite-testing
- dev-dev
- dev-feat-fix-db-pagination
- dev-feat-G2
- dev-feat-large-project-support
- dev-feat-0.4
- dev-feat-user-fixes
- dev-feat-functions-and-storage-fixes
- dev-fix-firebase-duplicate-attributes
- dev-fix-attribute-document-import
- dev-feat-appwrite-fixes
- dev-feat-update-name
- dev-feat-improve-features
- dev-fix-incorrect-imports
- dev-feat-initial-push
This package is auto-updated.
Last update: 2024-11-12 00:32:28 UTC
README
Utopia Migration is a simple and lite library to migrate and transform resources inbetween services. This library is aiming to be as simple and easy to learn and use. This library is maintained by the Appwrite team.
Although this library is part of the Utopia Framework project it is dependency free and can be used as standalone with any other PHP project or framework.
Getting Started
Install using composer:
composer require utopia-php/migration
Init in your application:
<?php use Utopia\Migration\Transfer; use Utopia\Migration\Sources\NHost; use Utopia\Migration\Destinations\Appwrite; require_once __DIR__ . '/../../vendor/autoload.php'; // Initialize your Source $source = new NHost('db.xxxxxxxxx.nhost.run', 'database-name', 'username', 'password'); // Initialize your Destination $destination = new Appwrite('project-id', 'https://cloud.appwrite.io/v1', 'api-key'); // Initialize Transfer $migration = new Transfer($source, $destination); // Transfer the resource groups you want $transfer->run( [ Transfer::GROUP_AUTH ], function ($status) { echo $status['message'] . PHP_EOL; } );
Supported Resources Chart
Sources:
Destinations:
Warning The Local destination should be used for testing purposes only. It is not recommended to use this destination in production or as a backup. The local destination is there to confirm that a source is working correctly and to test the migration process with needing a target destination instance. This may change in the future however as the library matures.
System Requirements
Utopia Migration requires PHP 8.0 or later. We recommend using the latest PHP version whenever possible.
Copyright and license
The MIT License (MIT) http://www.opensource.org/licenses/mit-license.php