public function testBlueprintSchemaBuildAndDropIndexes() { $schema = $this->connection->getSchemaBuilder(); $schema->create('sample', function (\Ytake\LaravelCouchbase\Schema\Blueprint $blueprint) { $blueprint->primaryIndex(); $blueprint->index(["message"], "secondary"); $blueprint->dropPrimary(); $blueprint->dropIndex("secondary"); }); $indexes = $this->connection->openBucket('sample')->manager()->listN1qlIndexes(); foreach ($indexes as $index) { $this->assertNotSame('sample', $index->keyspace); } $this->removeBucket($this->connection->manager(), 'sample'); sleep(5); }
/** * {@inheritdoc} */ public function drop() { return $this->connection->manager()->removeBucket($this->table); }