Okay, I found:
$schema
= drupal_get_schema('mytable');
if
($schema['fields']['last_checked']['type'] != 'datetime') {
…
}
Nancy E. Wichmann, PMP
Injustice
anywhere is a threat to justice everywhere. - Martin L. King, Jr.
-----Original
Message-----
From:
development-bounces@drupal.org [mailto:development-bounces@drupal.org]On Behalf Of Nancy Wichmann
Sent: Thursday, May 14, 2009 12:11
PM
To: Development@Drupal. Org
Subject: [development] DB Column
Format
I have a module for which users seem to run the updates more than once,
so I try to make the update code sensitive to this.
In my latest change, I am converting from unix time to DATETIME. I
don’t see a function in the APIs that allows me to check what type the column
is. I can easily use “SHOW COLUMNS,” but I suspect that MySql and PgSql return
different results. Any ideas on how to make this database independent?
Nancy E. Wichmann, PMP
Injustice anywhere is a threat to justice everywhere. -
Martin L. King, Jr.