sas
unread,Apr 21, 2012, 12:43:32 PM4/21/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to play-framework
I've just created an evolution file like this:
DROP TABLE IF EXISTS `mytable`;
CREATE TABLE `mytable` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`parentId` int(10) unsigned DEFAULT NULL,
`type`
set('BRAND','GPRODUCT','UPRODUCT','FEATURE','TOPIC','GCAMPAIGN','UCAMPAIGN')
NOT NULL,
`visible` tinyint(4) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8;
on mysql it work fine, but when running it on the h2 in memory databse
I get the following error:
We got the following error: Unknown data type: "SET"; SQL statement:
CREATE TABLE `mytable` ( `id` int(10) unsigned NOT NULL
AUTO_INCREMENT, `parentId` int(10) unsigned DEFAULT NULL, `type`
set('BRAND','GPRODUCT','UPRODUCT','FEATURE','TOPIC','GCAMPAIGN','UCAMPAIGN')
NOT NULL, `visible` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY
(`id`), ) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8
[50004-158] [ERROR:50004, SQLSTATE:HY004], while trying to run this
SQL script:
Seems like the "set" data type is not supported on h2, so I tried with
this in my application.conf
db.default.driver=org.h2.Driver
db.default.url="jdbc:h2:mem:play;MODE=MYSQL"
But I keep getting the same error
It's really comfortable to work with an in-memory db for development,
it's a shame we can't make it compatible with production db
do you know any way to set the mysql compatibility level?
saludos
sas