Skip to content

Commit 94f4b2c

Browse files
fix tests
1 parent d83bcc6 commit 94f4b2c

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

tests/Migration/TableTest.php

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,19 @@ public function testAddColumnsInitialWithDefault(): void
5454
});
5555
});
5656

57-
$this->assertEquals([
58-
'alter table "test" add column "col_123" text not null default \'val_098\'',
59-
'alter table "test" alter column "col_123" drop default',
60-
'alter table "test" add column "col_456" text not null default \'val_765\'',
61-
'alter table "test" alter column "col_456" set default \'val_432\'',
62-
], array_column($queries, 'query'));
57+
if (Comparator::greaterThanOrEqualTo($this->app->version(), '11.15')) {
58+
$this->assertEquals([
59+
'alter table "test" add column "col_123" text not null default \'val_098\'',
60+
'alter table "test" alter column "col_123" drop default',
61+
'alter table "test" add column "col_456" text not null default \'val_765\'',
62+
'alter table "test" alter column "col_456" set default \'val_432\'',
63+
], array_column($queries, 'query'));
64+
} else {
65+
$this->assertEquals([
66+
'alter table "test" add column "col_123" text not null default \'val_098\', add column "col_456" text not null default \'val_765\'',
67+
'alter table "test" alter column "col_123" drop default',
68+
'alter table "test" alter column "col_456" set default \'val_432\'',
69+
], array_column($queries, 'query'));
70+
}
6371
}
6472
}

0 commit comments

Comments
 (0)