// Use database specific data type and ensure that table is created.
$table_specification = array(
'description' => 'Schema table description.',
'fields' => array(
'timestamp' => array(
'mysql_type' => 'timestamp',
'pgsql_type' => 'timestamp',
'sqlite_type' => 'datetime',
'not null' => FALSE,
'default' => NULL,
),
),
);
try {
db_create_table('test_timestamp', $table_specification);
}
catch (Exception $e) {}
$this->assertTrue(db_table_exists('test_timestamp'), t('Table with database specific datatype was created.'));
This test fails on oracle because it is not included in the list. But why don't we move those tests inside the database driver specific implementation?
Comments
Comment #1
aaaristo commentedthe previous snippet is defined in modules/simpletest/tests/schema.test
Comment #2
damien tournoud commentedDefinitely, but that's D8 material (along with packaging database engines as proper projects on d.o).
Comment #3
aaaristo commentedok
Comment #4
aaaristo commenteduups changed the status, sorry
Comment #5
jhedstromIs this still relevant?
Comment #16
quietone commentedSimpletest is no longer in core and is about \Drupal\KernelTests\Core\Database\SchemaTest::testSchema so moving to the testing component which is phpunit.
Comment #22
smustgrave commentedBeen 8 years without a follow up for #8, safe to say this can be closed for now.
If still a valid feature in D10 please reopen updating issue summary.
Thanks!