a la #866340: Remove support for date and time types, the lastimported column of type datetime is unsupported, which breaks migrate install with the following:
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT NULL COMMENT 'Date and time of last completed import', `highwater` VARC' at line 4: CREATE TABLE {migrate_status} ( `machine_name` VARCHAR(255) NOT NULL COMMENT 'Unique machine name for migration', `status` TINYINT unsigned NOT NULL DEFAULT 0 COMMENT 'Current status of migration', `lastimported` DEFAULT NULL COMMENT 'Date and time of last completed import', `highwater` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Highwater mark for detecting updated content', `lastthroughput` INT DEFAULT NULL COMMENT 'Rate of success during most recent completed import (# per minute)', PRIMARY KEY (`machine_name`) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Status information for migrations'; Array ( ) in db_create_table() (line 2561 of /d7/includes/database/database.inc).

Moshe you're on the comment thread so I'm sure you're aware of this, and it looks like there's discussion of rolling that patch back anyway. So whatever it's worth.

CommentFileSizeAuthor
#2 mysql_type.patch584 byteslefnire
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

moshe weitzman’s picture

oh right. that issue pisses me off ... the easiest fix here is to start using integer timestamp like rest of drupal. dad, but true.

lefnire’s picture

FileSize
584 bytes

temp fix

moshe weitzman’s picture

Hmmm. Karen speculates that an undefined datetime could cause problems. I don't know if thats true or not. Also, would be safer to declare migrate_datetime so we don't conflict with another module.

lefnire’s picture

well a la #1 we should just use int timestamps instead, right? I'll get around to that patch soon as i can

mikeryan’s picture

Assigned: Unassigned » mikeryan

This finally bit me building a new D7 site, I'll fix it today (make the field an integer timestamp).

mikeryan’s picture

Status: Active » Needs review

I've committed this - I didn't have an active D7 site to test against, so the update functions for migrate and migrate_example are untested. If someone with an active D7 Migrate 2 installation could try updating and report here, I'd appreciate it.

Thanks.

mikeryan’s picture

I've committed the change to the D6 branch as well, let's keep them consistent.

mikeryan’s picture

Status: Needs review » Fixed

The only question was the D7 update functions, and at this point I would hope someone would've yelled if they didn't work...

Status: Fixed » Closed (fixed)

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