node.js - creating model in mongoose -
this schema design mysql table, trying migrate mongodb , using mongoose , confuse of datatype use in creating model locators table or collection... still new on mongodb hope can me. or okay in mongoose use model without declaring datatype ?
like this
var locatormodel = new schema({});
thank in advance.
create table `locators` ( `id` int(10) unsigned not null auto_increment, `mch_id` varchar(15) not null , `lat` double(10,6) null default null, `lng` double(10,6) null default null, `latcot` char(1) null default null, `ttime` time null default null, `tdate` date null default null, `tdatetime` datetime null default null, `velo` decimal(5,2) null default null, `created_at` timestamp null default current_timestamp, `updated_at` timestamp null default null, primary key (`id`), index `locators_mch_id_tdatetime_index` (`mch_id`, `tdatetime`), index `locators_created_at_index` (`created_at`) )
Comments
Post a Comment