diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php index 24cec35eac..32c311b10a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php @@ -277,9 +277,6 @@ class Create extends Action $key = $attribute['key']; $type = $attribute['type']; switch ($type) { - case Database::VAR_INTEGER: - $size = 4; - break; case Database::VAR_BIGINT: $size = 8; break; diff --git a/tests/e2e/Services/TablesDB/DatabasesNumericTypesTest.php b/tests/e2e/Services/TablesDB/DatabasesNumericTypesTest.php index 2da7769672..0e46d9466c 100644 --- a/tests/e2e/Services/TablesDB/DatabasesNumericTypesTest.php +++ b/tests/e2e/Services/TablesDB/DatabasesNumericTypesTest.php @@ -75,9 +75,9 @@ class DatabasesNumericTypesTest extends Scope $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/bigint', $headers, [ 'key' => 'bigint_field', 'required' => false, - 'min' => -900719925, - 'max' => 900719925, - 'default' => 123, + 'min' => -9007199254740991, + 'max' => 9007199254740991, + 'default' => 9007199254740000, ]); // Cache before waiting so that if waitForAllAttributes times out, @@ -139,9 +139,9 @@ class DatabasesNumericTypesTest extends Scope $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/bigint', $headers, [ 'key' => 'bigint_field', 'required' => false, - 'min' => -900719925, - 'max' => 900719925, - 'default' => 123, + 'min' => -9007199254740991, + 'max' => 9007199254740991, + 'default' => 9007199254740000, ]); $this->waitForAllAttributes($databaseId, $tableId); @@ -213,9 +213,9 @@ class DatabasesNumericTypesTest extends Scope $this->assertEquals('bigint', $bigintColumn['body']['type']); $this->assertEquals(false, $bigintColumn['body']['required']); $this->assertEquals(false, $bigintColumn['body']['array']); - $this->assertEquals(-900719925, $bigintColumn['body']['min']); - $this->assertEquals(900719925, $bigintColumn['body']['max']); - $this->assertEquals(123, $bigintColumn['body']['default']); + $this->assertEquals(-9007199254740991, $bigintColumn['body']['min']); + $this->assertEquals(9007199254740991, $bigintColumn['body']['max']); + $this->assertEquals(9007199254740000, $bigintColumn['body']['default']); } public function testListColumnsWithNumericTypes(): void