From fc1ee326ab081cd1bdfaa8b2acccf806d724d4ad Mon Sep 17 00:00:00 2001 From: elfarqy Date: Wed, 21 Jun 2017 09:17:51 +0700 Subject: [PATCH 1/2] translating readme.md in english version --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index f14200f..610d348 100644 --- a/README.md +++ b/README.md @@ -155,8 +155,36 @@ yii arangodb-migrate/create create_user_collection # applies ALL new migrations yii arangodb-migrate +# Apply 1 migration +yii arangodb-migrate/up 1 + # reverts the last applied migration yii arangodb-migrate/down + +# Rollback 1 migration +yii arangodb-migrate/down 1 +``` + +Once migration created, you can configure the migration: + +When you start the migration as in the example below, you create a normal document collection with the migration name, you need to add an additional parameter `Type => 3` to create the `edge collection`. Example of such a query: `$this-> createCollection ('serices', ['Type' => 3] );` If you want to create a document collection, then delete the `'Type' => 3` or replace the number 3 with 2. + + +```php +class m170413_210957_create_services_collection extends \explosivebit\arangodb\Migration +{ + public function up() + { + # When you start the migration, a collection of "services" with the edge type is created + $this->createCollection('services',['Type' => 3]); + } + + public function down() + { + # When the migration rollback starts, the collection "services" + $this->dropCollection('services'); + } +} ``` From f8db82e5b0dc058d76c6651c3744bb4b1051f12b Mon Sep 17 00:00:00 2001 From: elfarqy Date: Wed, 21 Jun 2017 09:19:14 +0700 Subject: [PATCH 2/2] fixing typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 610d348..35399b8 100644 --- a/README.md +++ b/README.md @@ -167,7 +167,7 @@ yii arangodb-migrate/down 1 Once migration created, you can configure the migration: -When you start the migration as in the example below, you create a normal document collection with the migration name, you need to add an additional parameter `Type => 3` to create the `edge collection`. Example of such a query: `$this-> createCollection ('serices', ['Type' => 3] );` If you want to create a document collection, then delete the `'Type' => 3` or replace the number 3 with 2. +When you start the migration as in the example below, you create a normal document collection with the migration name, you need to add an additional parameter `Type => 3` to create the `edge collection`. Example of such a query: `$this-> createCollection ('services', ['Type' => 3] );` If you want to create a document collection, then delete the `'Type' => 3` or replace the number 3 with 2. ```php