assertTrue(Schema::hasColumn('form_submissions', 'failure_response_code')); } public function test_failure_response_code_is_nullable_string_40(): void { $row = DB::selectOne( 'SELECT DATA_TYPE, CHARACTER_MAXIMUM_LENGTH, IS_NULLABLE, COLUMN_DEFAULT FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = ? AND COLUMN_NAME = ?', ['form_submissions', 'failure_response_code'], ); $this->assertNotNull($row, 'failure_response_code column missing'); $this->assertSame('varchar', strtolower((string) $row->DATA_TYPE)); $this->assertSame(40, (int) $row->CHARACTER_MAXIMUM_LENGTH); $this->assertSame('YES', $row->IS_NULLABLE); $this->assertNull($row->COLUMN_DEFAULT); } public function test_failure_response_code_index_present(): void { $row = DB::selectOne( 'SELECT INDEX_NAME FROM information_schema.STATISTICS WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = ? AND INDEX_NAME = ?', ['form_submissions', 'fs_failure_response_code_idx'], ); $this->assertNotNull($row, 'fs_failure_response_code_idx missing'); } }