I'm using Table Wizard and migrate to bring in data from an old Slashcode site.

When adding tables from the existing slashcode database, I get the following errors, which means I can't use enum, date, and timestamp fields to migrate data.

I'm not sure what other information you might need to help troubleshoot this, but let me know what I can provide to help.

* Field blocks.type: no Schema type for mysql type enum.
* Field blocks.last_update: no Schema type for mysql type timestamp.
* Field discussions.type: no Schema type for mysql type enum.
* Field discussions.flags: no Schema type for mysql type enum.
* Field message_drop.date: no Schema type for mysql type timestamp.
* Field message_log.date: no Schema type for mysql type timestamp.
* Field message_web.updated: no Schema type for mysql type timestamp.
* Field message_web.date: no Schema type for mysql type timestamp.
* Field stories.writestatus: no Schema type for mysql type enum.
* Field users_info.lastgranted: no Schema type for mysql type date.
* Field users_info.lastmm: no Schema type for mysql type date.
* Field users_info.lastaccess: no Schema type for mysql type date.
* Field blocks.type: no Schema type for mysql type enum.
* Field blocks.last_update: no Schema type for mysql type timestamp.
* Field discussions.type: no Schema type for mysql type enum.
* Field discussions.flags: no Schema type for mysql type enum.
* Field message_drop.date: no Schema type for mysql type timestamp.
* Field message_log.date: no Schema type for mysql type timestamp.
* Field message_web.updated: no Schema type for mysql type timestamp.
* Field message_web.date: no Schema type for mysql type timestamp.
* Field stories.writestatus: no Schema type for mysql type enum.
* Field users_info.lastgranted: no Schema type for mysql type date.
* Field users_info.lastmm: no Schema type for mysql type date.
* Field users_info.lastaccess: no Schema type for mysql type date.
* Field blocks.type: no Schema type for mysql type enum.
* Field blocks.last_update: no Schema type for mysql type timestamp.
* Field discussions.type: no Schema type for mysql type enum.
* Field discussions.flags: no Schema type for mysql type enum.
* Field message_drop.date: no Schema type for mysql type timestamp.
* Field message_log.date: no Schema type for mysql type timestamp.
* Field message_web.updated: no Schema type for mysql type timestamp.
* Field message_web.date: no Schema type for mysql type timestamp.
* Field stories.writestatus: no Schema type for mysql type enum.
* Field users_info.lastgranted: no Schema type for mysql type date.
* Field users_info.lastmm: no Schema type for mysql type date.
* Field users_info.lastaccess: no Schema type for mysql type date.
* Field blocks.type: no Schema type for mysql type enum.
* Field blocks.last_update: no Schema type for mysql type timestamp.
* Field discussions.type: no Schema type for mysql type enum.
* Field discussions.flags: no Schema type for mysql type enum.
* Field message_drop.date: no Schema type for mysql type timestamp.
* Field message_log.date: no Schema type for mysql type timestamp.
* Field message_web.updated: no Schema type for mysql type timestamp.
* Field message_web.date: no Schema type for mysql type timestamp.
* Field stories.writestatus: no Schema type for mysql type enum.
* Field users_info.lastgranted: no Schema type for mysql type date.
* Field users_info.lastmm: no Schema type for mysql type date.
* Field users_info.lastaccess: no Schema type for mysql type date.
* Field blocks.type: no Schema type for mysql type enum.
* Field blocks.last_update: no Schema type for mysql type timestamp.
* Field discussions.type: no Schema type for mysql type enum.
* Field discussions.flags: no Schema type for mysql type enum.
* Field message_drop.date: no Schema type for mysql type timestamp.
* Field message_log.date: no Schema type for mysql type timestamp.
* Field message_web.updated: no Schema type for mysql type timestamp.
* Field message_web.date: no Schema type for mysql type timestamp.
* Field stories.writestatus: no Schema type for mysql type enum.
* Field users_info.lastgranted: no Schema type for mysql type date.
* Field users_info.lastmm: no Schema type for mysql type date.
* Field users_info.lastaccess: no Schema type for mysql type date.
* Field blocks.type: no Schema type for mysql type enum.
* Field blocks.last_update: no Schema type for mysql type timestamp.
* Field discussions.type: no Schema type for mysql type enum.
* Field discussions.flags: no Schema type for mysql type enum.
* Field message_drop.date: no Schema type for mysql type timestamp.
* Field message_log.date: no Schema type for mysql type timestamp.
* Field message_web.updated: no Schema type for mysql type timestamp.
* Field message_web.date: no Schema type for mysql type timestamp.
* Field stories.writestatus: no Schema type for mysql type enum.
* Field users_info.lastgranted: no Schema type for mysql type date.
* Field users_info.lastmm: no Schema type for mysql type date.
* Field users_info.lastaccess: no Schema type for mysql type date.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mikeryan’s picture

Status: Active » Closed (works as designed)

It's working as designed - the schema module is designed to align database tables with the Drupal schema API, and the schema API does not support these types. See #293483: Add support for more field types to schema API for a proposal to address this in Drupal 7 (potentially with a backport to D6).

That being said, perhaps the engine_type_map() hooks could perform what that core issue is proposing and get you at least part way there (although I think there'll need to be work on the Table Wizard side as well).

mikeryan’s picture

Category: bug » feature
mikeryan’s picture

Status: Closed (works as designed) » Active

The issue previously referenced has been marked as a dupe of #200953: Schema API lacks the 'time' and 'date' type.

moshe weitzman’s picture

Perhaps we can automatically avoid these error messages? I am seeing them too on a client project.

matason’s picture

Version: 6.x-1.4-rc1 » 6.x-1.6
Status: Active » Needs review
FileSize
2.29 KB

The attached patch adds a setting at /admin/build/schema/settings that enables suppression of the missing data type warnings.

It needs review as it also changes the function signature of schema_schema_type from:

function schema_schema_type($type, $table, $field, $engine = NULL, $warn = TRUE) {

to

function schema_schema_type($type, $table, $field, $engine = NULL) {

This appears okay to me because, at least in the schema code, the $warn parameter isn't passed in on any calls to schema_schema_type()

mikeryan’s picture

Status: Needs review » Fixed

Committed, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

verta’s picture

Status: Closed (fixed) » Fixed

Is there a way for me to download the version of Schema with this fix? The current dev release is date stamped earler than this latest patch (July 2010).

Edit: I am trying to get this patch in order to work around this issue in Priorities: #884702: no Schema type for mysql type timestamp

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

verta’s picture

Status: Closed (fixed) » Fixed

Still can't download a release with this fix.

In 2 weeks the 'bot will close it again, perhaps there will be a release before then.

moshe weitzman’s picture

This module really needs a new maintainer. Volunteers welcome.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

verta’s picture

Status: Closed (fixed) » Needs work

I have posted #963586: Please set development and maintenance status on this project to known values to request the maintainers set this project's status to "Seeking new maintainer" ... so perhaps a developer looking for a project will find it.

verta’s picture

This project is required by several important and active projects.

Required by:

Data Admin UI
Table Wizard
Data Node
Data Taxonomy
Migrate
Migrate Extras
Table Wizard Import Delimited Files

... just to name the ones that I know about, there are probably more.

matason’s picture

Status: Needs work » Postponed

Hi verta,

The 6.x-1.x-dev version appears to have the code from the patch included, perhaps you could try it and report back?

verta’s picture

I opened the file downloaded as dev, and none of the files are stamped from September 24 or later.

I will try it out though - any reason the timestamp on the main page for dev release is still at July 11th, the day that everything got released?

karschsp’s picture

verta, the date of the 6.x-1.x-dev release on the project page is now marked as 12/3/10. Does that release fix your issue?

byronveale’s picture

If by "fix" you mean offering the "suppress warnings" setting, then yes, it's fixed.

So if the Drupal schema API doesn't recognize these data types, are there alternates we should be using? Or am I totally missing something?

The error messages still occur for me, here's my setup:

Server version: 5.0.84
Protocol version: 10
Server: Localhost via UNIX socket
User: byron@localhost
MySQL charset: UTF-8 Unicode (utf8)
MySQL connection collation: utf8_unicode_ci
MySQL client version: 5.0.84
Used PHP extensions: mysql

PHP Version 5.2.10
Linux 2.6.18-194.26.1.el5 #1 SMP i686 (CentOS 5.5)

Apache/2.2.3 (CentOS)

JeebsUK’s picture

Is there ever likely to be any movement on this/was a new maintainer ever found for this module? I have been suffering from this issue and I have just downloaded the latest 6.x dev version and the problem still exists. Thanks!

arekanderu’s picture

I find beyond insane that drupal does not support timestamp, default current_timestamp and on update current_timestamp in their schema, even if you use mysql_type and under the developers responsibility to make it mysql-only, and i also find it even more insane that at least there is no other way to run a raw query in install file so you can do it manually.

gisle’s picture

Version: 6.x-1.6 » 7.x-1.0-beta4
Issue tags: +Needs backport to D6

This problem is in the 7.x-1.0-beta4 as well. I would call this a bug, but I'm not changing category.

qasimzee’s picture

subscribing

Chris Charlton’s picture

4 years ago we almost could have this done. :( Why did this stall? Seems necessary for QOL.

  • mikeryan committed 56dae26 on 8.x-1.x
    #468644 by matason: Disable warnings for missing data types
    
    
Chris Charlton’s picture

Patch in #24 looks simple enough to dupe for D7.

Does this ticket really need to stay Postponed?

Chris Charlton’s picture

Bump?