/** * @test */ function it_adds_a_new_integer_field_to_table() { $blueprint = new Blueprint('testtable'); $blueprint->integer('f_integer'); $def = $blueprint->toSql($this->connection, $this->grammar); $this->assertContains("alter table \"testtable\" add \"f_integer\" integer", $def[0]); }
/** * @test */ function it_drops_a_blob_table() { $blueprint = new Blueprint('testtable'); $blueprint->dropBlob(); $def = $blueprint->toSql($this->connection, $this->grammar); $this->assertContains("drop blob table", $def[0]); }
/** * Returns index fields for all fulltext indexes. * * @param \RatkoR\Crate\Schema\Blueprint $blueprint * @return array */ protected function getIndexes(Blueprint $blueprint) { $allIndexes = $blueprint->getIndexes(); $compiled = []; foreach ($allIndexes as $index) { $compiled[] = $this->createIndexSql($index); } return $compiled; }