sails.js - sails lift fails when performing alter auto-migration strategy by trying to do select with IN() without ids in IN() -


when lifting sails, fatal error when trying perform alter auto-migration strategy. error message not helpful , traced find things sails lift performing caused error. these last queries executed (look @ last query).

describe `class` show index `class`; select `class`.`name`, `class`.`schoolfk`, `class`.`id`, `class`.`createdat`, `class`.`updatedat` `class` drop table `class` describe `class` create table `class` (`name` varchar(50) , `schoolfk` int , `id` int not null auto_increment primary key, `createdat` datetime , `updatedat` datetime ) describe `class` show index `class`; insert `class` (`class`.`name`, `class`.`schoolfk`, `class`.`id`, `class`.`createdat`, `class`. `updatedat`) values ('9 n', 1, 7, '2014-08-16 22:35:07', '2014-08-16 22:35:07'); insert `class` (`class`.`name`, `class`.`schoolfk`, `class`.`id`, `class`.`createdat`, `class`. `updatedat`) values ('9m', 1, 9, '2014-08-16 23:07:53', '2014-08-16 23:07:53'); insert `class` (`class`.`name`, `class`.`schoolfk`, `class`.`id`, `class`.`createdat`, `class`. `updatedat`) values ('9 c', 1, 5, '2014-08-16 22:07:01', '2014-08-16 22:07:01'); insert `class` (`class`.`name`, `class`.`schoolfk`, `class`.`id`, `class`.`createdat`, `class`. `updatedat`) values ('9 p', 1, 8, '2014-08-16 22:40:29', '2014-08-16 22:40:29');  select * `class` `id` in (7,9,5,8);  describe `exam` show index `exam`; select `exam`.`academicyear`, `exam`.`schoolfk`, `exam`.`classfk`, `exam`.`term`, `exam`.`examno`, `exam`.`lesson`, `exam`.`examtopics`, `exam`.`userfk`, `exam`.`id`, `exam`.`createdat`, `exam`.`updatedat` `exam` drop table `exam` describe `exam` create table `exam` (`academicyear` varchar(20) , `schoolfk` int , `classfk` int , `term` varchar(50) , `examno` varchar(50) , `lesson` varchar(255) , `examtopics` longtext , `userfk` int , `id` int not null auto_increment primary key, `createdat` datetime , `updatedat` datetime ) describe `exam` show index `exam`; select * `exam` `id` in (); 

in last query, trying select in() without supplying values (that table empty , apparently couldnt find ids put in there doing in class table query above)

my question why trying if table empty (no insertions seen above exam table) , how can fix this?

i worked around problem putting data in exam table couldn't find out why sails trying in() without parameters when table empty.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -