Skip to content
Snippets Groups Projects
Commit 468c1e4b authored by ems19's avatar ems19
Browse files

[ADD] ADD CREATED_AT AND UPDATED_AT

parent c996d16c
No related branches found
No related tags found
4 merge requests!377prd_version of simcaq,!373merge dev -> homologa,!370Dev migration,!369Postgres migration
...@@ -62,7 +62,10 @@ var Publication = db.define("Publication",{ ...@@ -62,7 +62,10 @@ var Publication = db.define("Publication",{
allowNull: false, allowNull: false,
defaultValue: false defaultValue: false
} }
}); },{timestamp:true,
createdAt: 'created_at',
updatedAt: 'updated_at'}
);
Publication.generateObjectId = function(){ Publication.generateObjectId = function(){
var timestamp = (new Date().getTime() / 1000 | 0).toString(16); var timestamp = (new Date().getTime() / 1000 | 0).toString(16);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment