Fixing 404 on page view when using PostgreSQL
Fixing 404 on page view when using PostgreSQL

closes #1801
- adding fixBools method to `server/models/base.js` to convert bools to 1/0 to be consistent with MySQL & sqlite3 data providers (based on @ErisDS recommendation)
- this in turn fixes the check in `server/controllers/frontend.js`, which does an explicit `post.page === 0` comparison (in pgsql this is a `boolean`, since the schema declares it as "bool" in `server/data/schema.js`, but MySQL/sqlite3 don't have concept of Boolean, only an integer or bit)
- any model retrieved from persistence will pass through this (possible future refactoring is to combine fixBools & fixDates into one "canonicalize()" to have a single loop pass)

theonlypat/Ghost,tyrikio/Ghost,wemakeweb/Ghost,Remchi/Ghost,sunh3/Ghost,Elektro1776/javaPress,qdk0901/Ghost,arvidsvensson/Ghost,BlueHatbRit/Ghost,tanbo800/Ghost,tadityar/Ghost,thomasalrin/Ghost,ballPointPenguin/Ghost,ryanorsinger/tryghost,ivanoats/ivanstorck.com,consoleblog/consoleblog,alexandrachifor/Ghost,JonSmith/Ghost,JonSmith/Ghost,delgermurun/Ghost,PeterCxy/Ghost,Empeeric/justanidea,johnnymitch/Ghost,Jonekee/Ghost,blankmaker/Ghost,e10/Ghost,ljhsai/Ghost,johngeorgewright/blog.j-g-w.info,lethalbrains/Ghost,aroneiermann/GhostJade,trunk-studio/Ghost,wangjun/Ghost,Kaenn/Ghost,Coding-House/Ghost,davidenq/Ghost-Blog,TryGhost/Ghost,influitive/crafters,kaychaks/kaushikc.org,handcode7/Ghost,dymx101/Ghost,ashishapy/ghostpy,Jai-Chaudhary/Ghost,ananthhh/Ghost,ygbhf/Ghost,jorgegilmoreira/ghost,Romdeau/Ghost,NikolaiIvanov/Ghost,karmakaze/Ghost,schematical/Ghost,ManRueda/manrueda-blog,zeropaper/Ghost,nneko/Ghost,cicorias/Ghost,rouanw/Ghost,LeandroNascimento/Ghost,PeterCxy/Ghost,MadeOnMars/Ghost,mlabieniec/ghost-env,exsodus3249/Ghost,mnitchie/Ghost,bsansouci/Ghost,ivanoats/ivanstorck.com,manishchhabra/Ghost,NamedGod/Ghost,sebgie/Ghost,olsio/Ghost,rizkyario/Ghost,praveenscience/Ghost,ladislas/ghost,jin/Ghost,imjerrybao/Ghost,cwonrails/Ghost,UsmanJ/Ghost,smedrano/Ghost,petersucks/blog,kaiqigong/Ghost,xiongjungit/Ghost,obsoleted/Ghost,mhhf/ghost-latex,load11/ghost,makapen/Ghost,skmezanul/Ghost,rchrd2/Ghost,axross/ghost,Japh/Ghost,lcamacho/Ghost,epicmiller/pages,yanntech/Ghost,Brunation11/Ghost,tidyui/Ghost,flpms/ghost-ad,lukw00/Ghost,rafaelstz/Ghost,cncodog/Ghost-zh-codog,lowkeyfred/Ghost,mdbw/ghost,gcamana/Ghost,cysys/ghost-openshift,ManRueda/manrueda-blog,bitjson/Ghost,JohnONolan/Ghost,lf2941270/Ghost,kevinansfield/Ghost,flpms/ghost-ad,velimir0xff/Ghost,rollokb/Ghost,thomasalrin/Ghost,shannonshsu/Ghost,krahman/Ghost,kolorahl/Ghost,madole/diverse-learners,VillainyStudios/Ghost,tidyui/Ghost,chris-yoon90/Ghost,10hacks/blog,ryansukale/ux.ryansukale.com,shrimpy/Ghost,tanbo800/Ghost,daihuaye/Ghost,Dnlyc/Ghost,achimos/ghost_as,FredericBernardo/Ghost,STANAPO/Ghost,mattchupp/blog,augbog/Ghost,nmukh/Ghost,jamesyothers/Ghost,hoxoa/Ghost,NovaDevelopGroup/Academy,liftup/ghost,gabfssilva/Ghost,edurangel/Ghost,katiefenn/Ghost,jorgegilmoreira/ghost,greyhwndz/Ghost,neynah/GhostSS,Loyalsoldier/Ghost,ErisDS/Ghost,Bunk/Ghost,vlmhco/personal-blog,ClarkGH/Ghost,patterncoder/patterncoder,alecho/Ghost,Brunation11/Ghost,jiangjian-zh/Ghost,netputer/Ghost,ManRueda/Ghost,metadevfoundation/Ghost,BlueHatbRit/Ghost,mattvh/Ghost,jiachenning/Ghost,sceltoas/Ghost,devleague/uber-hackathon,developer-prosenjit/Ghost,patterncoder/patterncoder,Japh/Ghost,Japh/shortcoffee,dqj/Ghost,Netazoic/bad-gateway,aschmoe/jesse-ghost-app,imjerrybao/Ghost,phillipalexander/Ghost,riyadhalnur/Ghost,yangli1990/Ghost,ryanbrunner/crafters,jomofrodo/ccb-ghost,ckousik/Ghost,velimir0xff/Ghost,MadeOnMars/Ghost,Smile42RU/Ghost,AlexKVal/Ghost,Feitianyuan/Ghost,jomofrodo/ccb-ghost,davidmenger/nodejsfan,situkangsayur/Ghost,avh4/blog.avh4.net,ITJesse/Ghost-zh,julianromera/Ghost,Bunk/Ghost,achimos/ghost_as,claudiordgz/Ghost,jiachenning/Ghost,leonli/ghost,kortemy/Ghost,dYale/blog,johngeorgewright/blog.j-g-w.info,netputer/Ghost,developer-prosenjit/Ghost,ngosinafrica/SiteForNGOs,Xibao-Lv/Ghost,singular78/Ghost,ManRueda/Ghost,morficus/Ghost,pollbox/ghostblog,davegw/dgw-website,SachaG/bjjbot-blog,floofydoug/Ghost,NodeJSBarenko/Ghost,ericbenson/GhostAzureSetup,shrimpy/Ghost,sifatsultan/js-ghost,thehogfather/Ghost,ljhsai/Ghost,xiongjungit/Ghost,bsansouci/Ghost,tadityar/Ghost,allspiritseve/mindlikewater,panezhang/Ghost,uploadcare/uploadcare-ghost-demo,pensierinmusica/Ghost,ErisDS/Ghost,zhiyishou/Ghost,lethalbrains/Ghost,Dnlyc/Ghost,yundt/seisenpenji,Azzurrio/Ghost,scopevale/wethepeopleweb.org,NamedGod/Ghost,omaracrystal/Ghost,atandon/Ghost,daimaqiao/Ghost-Bridge,alanmoo/moo-on-the-web,rizkyario/Ghost,JonathanZWhite/Ghost,omaracrystal/Ghost,handcode7/Ghost,tandrewnichols/ghost,halfdan/Ghost,DesenTao/Ghost,vainglori0us/urban-fortnight,gleneivey/Ghost,camilodelvasto/herokughost,Kaenn/Ghost,dYale/blog,syaiful6/Ghost,UsmanJ/Ghost,Jai-Chaudhary/Ghost,YY030913/Ghost,trepafi/ghost-base,novaugust/Ghost,hnq90/Ghost,rafaelstz/Ghost,cysys/ghost-openshift,llv22/Ghost,lukw00/Ghost,NovaDevelopGroup/Academy,skleung/blog,Rovak/Ghost,javorszky/Ghost,neynah/GhostSS,mohanambati/Ghost,tuan/Ghost,katrotz/blog.katrotz.space,exsodus3249/Ghost,hoxoa/Ghost,cqricky/Ghost,Yarov/yarov,lukaszklis/Ghost,InnoD-WebTier/hardboiled_ghost,telco2011/Ghost,praveenscience/Ghost,kaychaks/kaushikc.org,tksander/Ghost,e10/Ghost,k2byew/Ghost,javorszky/Ghost,bastianbin/Ghost,ghostchina/Ghost-zh,ryansukale/ux.ryansukale.com,pathayes/FoodBlog,veyo-care/Ghost,GarrethDottin/Habits-Design,ddeveloperr/Ghost,qdk0901/Ghost,claudiordgz/Ghost,jacostag/Ghost,jgillich/Ghost,RoopaS/demo-intern,wallmarkets/Ghost,riyadhalnur/Ghost,PDXIII/Ghost-FormMailer,fredeerock/atlabghost,choskim/Ghost,jomofrodo/ccb-ghost,rouanw/Ghost,melissaroman/ghost-blog,petersucks/blog,jeonghwan-kim/Ghost,theonlypat/Ghost,Sebastian1011/Ghost,jparyani/GhostSS,rizkyario/Ghost,jeonghwan-kim/Ghost,letsjustfixit/Ghost,PaulBGD/Ghost-Plus,veyo-care/Ghost,blankmaker/Ghost,influitive/crafters,camilodelvasto/localghost,leonli/ghost,schneidmaster/theventriloquist.us,javimolla/Ghost,jparyani/GhostSS,ghostchina/Ghost-zh,adam-paterson/blog,darvelo/Ghost,etdev/blog,Trendy/Ghost,dymx101/Ghost,novaugust/Ghost,sifatsultan/js-ghost,aroneiermann/GhostJade,hilerchyn/Ghost,sebgie/Ghost,thehogfather/Ghost,cysys/ghost-openshift,choskim/Ghost,AnthonyCorrado/Ghost,edsadr/Ghost,tchapi/igneet-blog,sangcu/Ghost,DesenTao/Ghost,ghostchina/Ghost.zh,bastianbin/Ghost,rmoorman/Ghost,allanjsx/Ghost,situkangsayur/Ghost,lukekhamilton/Ghost,smaty1/Ghost,rmoorman/Ghost,icowan/Ghost,ivantedja/ghost,rito/Ghost,davidenq/Ghost-Blog,dai-shi/Ghost,dqj/Ghost,rameshponnada/Ghost,JonathanZWhite/Ghost,woodyrew/Ghost,kmeurer/Ghost,acburdine/Ghost,jaguerra/Ghost,barbastan/Ghost,stridespace/Ghost,wemakeweb/Ghost,camilodelvasto/localghost,Feitianyuan/Ghost,mattvh/Ghost,bisoe/Ghost,PDXIII/Ghost-FormMailer,davidblurton/salmondesign-old,klinker-apps/ghost,freele/ghost,yanntech/Ghost,sangcu/Ghost,julianromera/Ghost,wspandihai/Ghost,etanxing/Ghost,denzelwamburu/denzel.xyz,Jonekee/Ghost,ashishapy/ghostpy,karmakaze/Ghost,ClarkGH/Ghost,devleague/uber-hackathon,AlexKVal/Ghost,djensen47/Ghost,vainglori0us/urban-fortnight,Elektro1776/javaPress,diogogmt/Ghost,ignasbernotas/nullifer,v3rt1go/Ghost,jamesslock/Ghost,melissaroman/ghost-blog,cgiffard/Ghost,GarrethDottin/Habits-Design,dylanchernick/ghostblog,RufusMbugua/TheoryOfACoder,ballPointPenguin/Ghost,kmeurer/Ghost,NovaDevelopGroup/Academy,ddeveloperr/Ghost,Sebastian1011/Ghost,mlabieniec/ghost-env,ghostchina/Ghost.zh,wspandihai/Ghost,Alxandr/Blog,schematical/Ghost,Remchi/Ghost,pollbox/ghostblog,MrMaksimize/sdg1,jgillich/Ghost,jamesyothers/Ghost,greyhwndz/Ghost,diogogmt/Ghost,denzelwamburu/denzel.xyz,jiangjian-zh/Ghost,nakamuraapp/new-ghost,dai-shi/Ghost,carlosmtx/Ghost,rtorino/me-etc,skleung/blog,rameshponnada/Ghost,YY030913/Ghost,jacostag/Ghost,cwonrails/Ghost,panezhang/Ghost,tmp-reg/Ghost,lowkeyfred/Ghost,GroupxDev/javaPress,jin/Ghost,ThorstenHans/Ghost,psychobunny/Ghost,andrewconnell/Ghost,AileenCGN/Ghost,Alxandr/Blog,laispace/laiblog,mttschltz/ghostblog,etanxing/Ghost,hnarayanan/narayanan.co,andrewconnell/Ghost,ladislas/ghost,aexmachina/blog-old,KnowLoading/Ghost,daimaqiao/Ghost-Bridge,Xibao-Lv/Ghost,pedroha/Ghost,SachaG/bjjbot-blog,dylanchernick/ghostblog,singular78/Ghost,zackslash/Ghost,diancloud/Ghost,psychobunny/Ghost,Yarov/yarov,syaiful6/Ghost,Trendy/Ghost,kevinansfield/Ghost,dggr/Ghost-sr,Alxandr/Blog,nneko/Ghost,tksander/Ghost,eduardojmatos/eduardomatos.me,pbevin/Ghost,pbevin/Ghost,Sing-Li/GhostSS,ygbhf/Ghost,TribeMedia/Ghost,Gargol/Ghost,beautyOfProgram/Ghost,prosenjit-itobuz/Ghost,jomahoney/Ghost,smaty1/Ghost,weareleka/blog,Kikobeats/Ghost,k2byew/Ghost,mtvillwock/Ghost,Azzurrio/Ghost,camilodelvasto/herokughost,ManRueda/Ghost,rito/Ghost,carlosmtx/Ghost,vloom/blog,JohnONolan/Ghost,benstoltz/Ghost,ASwitlyk/Ghost,UnbounDev/Ghost,edurangel/Ghost,yangli1990/Ghost,allanjsx/Ghost,lf2941270/Ghost,PepijnSenders/whatsontheotherside,10hacks/blog,sceltoas/Ghost,rwjblue/Ghost,morficus/Ghost,lanffy/Ghost,skmezanul/Ghost,davidmenger/nodejsfan,atandon/Ghost,hyokosdeveloper/Ghost,ericbenson/GhostAzureSetup,smedrano/Ghost,javimolla/Ghost,Smile42RU/Ghost,alecho/Ghost,beautyOfProgram/Ghost,Kikobeats/Ghost,delgermurun/Ghost,Netazoic/bad-gateway,r14r/fork_nodejs_ghost,hnq90/Ghost,TribeMedia/Ghost,Shauky/Ghost,gleneivey/Ghost,mohanambati/Ghost,prosenjit-itobuz/Ghost,kortemy/Ghost,choskim/GhostAzure,augbog/Ghost,adam-paterson/blog,leonli/ghost,akveo/akveo-blog,mttschltz/ghostblog,Kaenn/Ghost,zhiyishou/Ghost,kevinansfield/Ghost,tandrewnichols/ghost,disordinary/Ghost,tmp-reg/Ghost,bbmepic/Ghost,virtuallyearthed/Ghost,jparyani/GhostSS,tyrikio/Ghost,greenboxindonesia/Ghost,jgladch/taskworksource,cncodog/Ghost-zh-codog,ineitzke/Ghost,klinker-apps/ghost,johnnymitch/Ghost,carlyledavis/Ghost,gcamana/Ghost,Loyalsoldier/Ghost,SkynetInc/steam,jomahoney/Ghost,r1N0Xmk2/Ghost,dggr/Ghost-sr,duyetdev/islab,Coding-House/Ghost,hyokosdeveloper/Ghost,novaugust/Ghost,cwonrails/Ghost,PepijnSenders/whatsontheotherside,codeincarnate/Ghost,ghostchina/website,mdbw/ghost,JohnONolan/Ghost,llv22/Ghost,Netazoic/bad-gateway,Gargol/Ghost,memezilla/Ghost,carlyledavis/Ghost,hnarayanan/narayanan.co,lukaszklis/Ghost,Japh/shortcoffee,ThorstenHans/Ghost,dgem/Ghost,r1N0Xmk2/Ghost,ngosinafrica/SiteForNGOs,cncodog/Ghost-zh-codog,flomotlik/Ghost,vloom/blog,cqricky/Ghost,ananthhh/Ghost,notno/Ghost,laispace/laiblog,jaswilli/Ghost,cobbspur/Ghost,pathayes/FoodBlog,sfpgmr/Ghost,NikolaiIvanov/Ghost,sankumsek/Ghost-ashram,thinq4yourself/Unmistakable-Blog,kwangkim/Ghost,kwangkim/Ghost,mhhf/ghost-latex,notno/Ghost,kolorahl/Ghost,choskim/GhostAzure,JulienBrks/Ghost,oimou-house/blog,manishchhabra/Ghost,RufusMbugua/TheoryOfACoder,Aaron1992/Ghost,bbmepic/Ghost,Netazoic/bad-gateway,francisco-filho/Ghost,GroupxDev/javaPress,letsjustfixit/Ghost,anijap/PhotoGhost,stridespace/Ghost,jaswilli/Ghost,disordinary/Ghost,SkynetInc/steam,greenboxindonesia/Ghost,dbalders/Ghost,stridespace/Ghost,ckousik/Ghost,davidblurton/salmondesign-old,bigertech/Ghost,mnitchie/Ghost,no1lov3sme/Ghost,yundt/seisenpenji,dgem/Ghost,davegw/dgw-website,BayPhillips/Ghost,devleague/uber-hackathon,pensierinmusica/Ghost,optikalefx/Ghost,icowan/Ghost,patrickdbakke/ghost-spa,duyetdev/islab,kmeurer/GhostAzureSetup,fredeerock/atlabghost,TryGhost/Ghost,diancloud/Ghost,halfdan/Ghost,uploadcare/uploadcare-ghost-demo,mayconxhh/Ghost,LeandroNascimento/Ghost,Klaudit/Ghost,PaulBGD/Ghost-Plus,choskim/ghost_exp,Elektro1776/javaPress,ErisDS/Ghost,mikecastro26/ghost-custom,sergeylukin/Ghost,ineitzke/Ghost,VillainyStudios/Ghost,axross/ghost,rollokb/Ghost,no1lov3sme/Ghost,allspiritseve/mindlikewater,AnthonyCorrado/Ghost,BayPhillips/Ghost,gabfssilva/Ghost,rchrd2/Ghost,sergeylukin/Ghost,edsadr/Ghost,IbrahimAmin/Ghost,vainglori0us/urban-fortnight,woodyrew/Ghost,Polyrhythm/dolce,STANAPO/Ghost,davidenq/Ghost-Blog,singular78/Ghost,ignasbernotas/nullifer,mtvillwock/Ghost,letsjustfixit/Ghost,wangjun/Ghost,chevex/undoctrinate,InnoD-WebTier/hardboiled_ghost,metadevfoundation/Ghost,Romdeau/Ghost,aschmoe/jesse-ghost-app,bisoe/Ghost,leninhasda/Ghost,mayconxhh/Ghost,katrotz/blog.katrotz.space,acburdine/Ghost,KnowLoading/Ghost,pedroha/Ghost,makapen/Ghost,thinq4yourself/Unmistakable-Blog,mlabieniec/ghost-env,telco2011/Ghost,vishnuharidas/Ghost,zackslash/Ghost,nmukh/Ghost,InnoD-WebTier/hardboiled_ghost,madole/diverse-learners,Kikobeats/Ghost,sunh3/Ghost,bitjson/Ghost,ryanbrunner/crafters,Klaudit/Ghost,jamesslock/Ghost,daihuaye/Ghost,obsoleted/Ghost,ASwitlyk/Ghost,janvt/Ghost,lukekhamilton/Ghost,optikalefx/Ghost,sajmoon/Ghost,chris-yoon90/Ghost,dggr/Ghost-sr,kaiqigong/Ghost,dbalders/Ghost,FredericBernardo/Ghost,memezilla/Ghost,telco2011/Ghost,dbalders/Ghost,arvidsvensson/Ghost,trunk-studio/Ghost,janvt/Ghost,ManRueda/manrueda-blog,jaguerra/Ghost,darvelo/Ghost,neynah/GhostSS,TryGhost/Ghost,sfpgmr/Ghost,IbrahimAmin/Ghost,anijap/PhotoGhost,bosung90/Ghost,bosung90/Ghost,shannonshsu/Ghost,load11/ghost,akveo/akveo-blog,codeincarnate/Ghost,acburdine/Ghost,liftup/ghost,hilerchyn/Ghost,UnbounDev/Ghost,sajmoon/Ghost,olsio/Ghost,sebgie/Ghost,mohanambati/Ghost,uniqname/everydaydelicious,zumobi/Ghost,flomotlik/Ghost,zeropaper/Ghost,weareleka/blog,daimaqiao/Ghost-Bridge,kortemy/Ghost,cicorias/Ghost,virtuallyearthed/Ghost,benstoltz/Ghost,phillipalexander/Ghost,djensen47/Ghost,lanffy/Ghost,mattchupp/blog,floofydoug/Ghost,zuphu/GhostBlog,r14r/fork_nodejs_ghost,wallmarkets/Ghost,barbastan/Ghost,Rovak/Ghost,etdev/blog,GroupxDev/javaPress,laispace/laiblog,JulienBrks/Ghost,schneidmaster/theventriloquist.us,v3rt1go/Ghost,zumobi/Ghost,francisco-filho/Ghost,allanjsx/Ghost,leninhasda/Ghost,jorgegilmoreira/ghost,ITJesse/Ghost-zh,epicmiller/pages