Skip to content

Commit 2681027

Browse files
committed
Fix creation table tests
1 parent dbbba72 commit 2681027

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/Hybrid/CreateTable/IncrementWithoutPrimaryKeyTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@ public function it_adds_a_big_increments_without_primary_key()
1818
{
1919
$blueprint = $this->createTable(function (Blueprint $table) {
2020
$table->bigIncrements('id')->withoutPrimaryKey();
21+
$table->uuid('uuid');
22+
23+
$table->primary(['id', 'uuid']);
2124
});
2225

2326
$this->assertCreateStatement(
2427
$blueprint,
25-
'create table `test` (`id` bigint unsigned not null auto_increment)'
28+
'create table `test` (`id` bigint unsigned not null auto_increment, `uuid` char(36) not null, primary key `test_id_uuid_primary`(`id`, `uuid`))'
2629
);
2730
}
2831

@@ -31,11 +34,14 @@ public function it_adds_an_id_without_primary_key()
3134
{
3235
$blueprint = $this->createTable(function (Blueprint $table) {
3336
$table->id()->withoutPrimaryKey();
37+
$table->uuid('uuid');
38+
39+
$table->primary(['id', 'uuid']);
3440
});
3541

3642
$this->assertCreateStatement(
3743
$blueprint,
38-
'create table `test` (`id` bigint unsigned not null auto_increment)'
44+
'create table `test` (`id` bigint unsigned not null auto_increment, `uuid` char(36) not null, primary key `test_id_uuid_primary`(`id`, `uuid`))'
3945
);
4046
}
4147
}

0 commit comments

Comments
 (0)