-
-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(database): alter table with only indices (#852)
- Loading branch information
Showing
2 changed files
with
24 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,6 +71,16 @@ public function test_it_can_alter_a_table_definition(): void | |
$this->assertSame('[email protected]', $user->email); | ||
} | ||
|
||
public function test_alter_for_only_indexes(): void | ||
{ | ||
$statement = new AlterTableStatement('table') | ||
->index('foo') | ||
->unique('bar') | ||
->compile(DatabaseDialect::SQLITE); | ||
|
||
$this->assertStringNotContainsString('ALTER TABLE', $statement); | ||
} | ||
|
||
private function getAlterTableMigration(): mixed | ||
{ | ||
return new class () implements DatabaseMigration { | ||
|