You can use the regular migration Artisan commands.
Blueprint commands are executed sequentially and non-transactional(!)
You can add ArangoDB's collection config options to the create method.
Schema::create('posts', function (Blueprint $collection) {
//
}, [
'type' => 3, // 2 -> normal collection, 3 -> edge-collection</li>
'waitForSync' => true, // if set to true, then all removal operations will instantly be synchronised to disk / If this is not specified, then the collection's default sync behavior will be applied.</li>
]);
See the ArangoDB Documentation for all options
Within the collection blueprint you can create indexes. ArangoDB knows the following types:
Type | Purpose | Blueprint Method |
---|---|---|
Hash | Exact matching | $collection->hashIndex($attributes, $indexOptions = []) |
Persistent | Ranged matching | $collection->persistentIndex($attributes, $indexOptions = []) |
Geo | Location matching | $collection->geoIndex($attributes, $indexOptions = []) |
TTL | Auto-expiring documents | $collection->ttlIndex($attributes, $indexOptions = []) |
Fulltext * | (Partial) text matching | $collection->fulltextIndex($attribute, $indexOptions = []) |
- Instead of fulltext indices you'll probably want to use ArangoSearch ArangoDB's powerful search engine.
See the ArangoDB Documentation for more information
Use $collection->dropIndex($attributes, $type)
to drop an index from within a Blueprint.
ArangoDB is schemaless so you can't create attributes. However you can perform some operations on attributes in existing documents.
dropAttribute($attributes)
deletes the attribute(s) in all documents within the collection.
hasAttribute($attribute)
Checks for the usage (! null) of the the attribute(s) in any document within the collection.
renameAttribute($from, $to)
renames the attribute in all documents within the collection.
You can create, edit or delete an ArangoDB view.
Schema::createView($viewName, $options);
Schema::createView($viewName, $options);
Schema::createView($viewName);