Merge branch 'main' into fix/tanstack-start-vite-output

This commit is contained in:
Harsh Mahajan authored and GitHub committed 2026-08-13 14:02:17 +05:30
commit 878f98960f
2 files changed
+16

No files matched your search

@@ -258,6 +258,9 @@ class Create extends Action
$dbForProject->purgeCachedDocument('database_' . $database->getSequence(), $collection->getId());
$dbForProject->purgeCachedCollection('database_' . $database->getSequence() . '_collection_' . $collection->getSequence());
// Reload the collection so its subquery filters include the schema created above.
$collection = $authorization->skip(fn () => $dbForProject->getDocument($databaseKey, $collection->getId()));
$queueForEvents
->setContext('database', $database)
->setParam('databaseId', $databaseId)
@@ -55,9 +55,22 @@ final class TablesDBColumnsTest extends Scope
['key' => 'address', 'type' => 'ip'],
['key' => 'status', 'type' => 'enum', 'elements' => ['on', 'off'], 'default' => 'on'],
],
'indexes' => [
['key' => 'slug_unique', 'type' => 'unique', 'attributes' => ['slug']],
],
]);
$this->assertEquals(201, $table['headers']['status-code']);
$this->assertCount(9, $table['body']['columns']);
$columnKeys = array_column($table['body']['columns'], 'key');
sort($columnKeys);
$this->assertEquals(
['address', 'archive', 'email', 'modulePath', 'slug', 'status', 'summary', 'title', 'website'],
$columnKeys,
);
$this->assertCount(1, $table['body']['indexes']);
$this->assertEquals('slug_unique', $table['body']['indexes'][0]['key']);
$this->assertEquals('available', $table['body']['indexes'][0]['status']);
$tableId = $table['body']['$id'];
$columns = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns', $headers);