Skip to content

Commit

Permalink
+ Indexes are now named according to Laravel's naming convention
Browse files Browse the repository at this point in the history
+ Added CRUD functions for view handling in migrations
  • Loading branch information
LaravelFreelancerNL committed Nov 22, 2019
1 parent 1fae152 commit 0a0a564
Show file tree
Hide file tree
Showing 9 changed files with 622 additions and 470 deletions.
13 changes: 13 additions & 0 deletions docs/migrations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Migrations

## Views (ArangoSearch)
You can create, edit or delete an ArangoDB view.

### New view
```Schema::createView($viewName, $options); ```

### Edit view
```Schema::createView($viewName, $options); ```

### Delete view
```Schema::createView($viewName); ```
19 changes: 13 additions & 6 deletions src/Facades/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,21 @@

use Closure;
use Illuminate\Support\Facades\Facade;
use LaravelFreelancerNL\Aranguent\Schema\Builder;

/**
* @method static \LaravelFreelancerNL\Aranguent\Schema\Builder create($collection, Closure $callback, $options = [])
* @method static \LaravelFreelancerNL\Aranguent\Schema\Builder drop(string $collection)
* @method static \LaravelFreelancerNL\Aranguent\Schema\Builder dropIfExists(string $collection)
* @method static \LaravelFreelancerNL\Aranguent\Schema\Builder table(string $table, \Closure $callback)
* @method static \LaravelFreelancerNL\Aranguent\Schema\Builder collection(string $collection, \Closure $callback)
* @method static void defaultStringLength(int $length)
* Table handling:
* @method static Builder create($collection, Closure $callback, $options = [])
* @method static Builder drop(string $collection)
* @method static Builder dropIfExists(string $collection)
* @method static Builder table(string $table, \Closure $callback)
*
* View handling:
* @method static Builder createView($name, array $properties, $type = 'ArangoSearch')
* @method static Builder getView(string $name)
* @method static Builder editView($name, array $properties)
* @method static Builder renameView(string $from, string $to)
* @method static Builder dropView(string $name)
*
* @see \LaravelFreelancerNL\Aranguent\Schema\Builder
*/
Expand Down
Loading

0 comments on commit 0a0a564

Please sign in to comment.