
# This is a fix for InnoDB in MySQL >= 4.1.x
# It "suspends judgement" for fkey relationships until are tables are set.
SET FOREIGN_KEY_CHECKS = 0;

#-----------------------------------------------------------------------------
#-- googlemap
#-----------------------------------------------------------------------------

DROP TABLE IF EXISTS `googlemap`;


CREATE TABLE `googlemap`
(
	`gmid` INTEGER(11)  NOT NULL AUTO_INCREMENT,
	`type` VARCHAR(255)  NOT NULL,
	`tagged_id` INTEGER(11)  NOT NULL,
	`location` VARCHAR(255)  NOT NULL,
	`longitude` FLOAT(12,8) default 0 NOT NULL,
	`latitude` FLOAT(12,8) default 0 NOT NULL,
	`zoom` INTEGER(11) default 1 NOT NULL,
	`created_at` DATETIME  NOT NULL,
	`updated_at` DATETIME  NOT NULL,
	PRIMARY KEY (`gmid`),
	KEY `gm_i_type`(`type`, `tagged_id`)
)Engine=InnoDB;

# This restores the fkey checks, after having unset them earlier
SET FOREIGN_KEY_CHECKS = 1;
