-
-
Notifications
You must be signed in to change notification settings - Fork 48
Description
Hi,
I created migration via sql script for my ups i have this
CREATE TABLE messages(IDint(11) NOT NULL AUTO_INCREMENT,userIDFromint(11) NOT NULL,userIDToint(11) NOT NULL,contenttext NOT NULL,roomIdint(11) NOT NULL DEFAULT '0',created_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE rooms (
roomId int(11) NOT NULL AUTO_INCREMENT,
roomName varchar(50) DEFAULT NULL,
creatorId int(11) DEFAULT NULL,
created_date timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (roomId)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;`
In my down sql i have this
drop table messages drop table rooms
then for my database connection
"prod": { "host": "localhost", "user": "maldito" , "password" : "balba2018!" , "database": "chatdb", "port":"3306", "driver": "mysql" },
when running this code i got an error
db-migrate up --config config/database.json -e prod
[ERROR] AssertionError [ERR_ASSERTION]: ifError got unwanted exception: ER_PARSE_ERROR: 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 'CREATE TABLE rooms (
roomId int(11) NOT NULL AUTO_INCREMENT,
then I try to remove then last sql it run perfectly
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.