Skip to content

Latest commit

 

History

History
25 lines (13 loc) · 663 Bytes

mongodb.md

File metadata and controls

25 lines (13 loc) · 663 Bytes

MongoDB

Listing prices and availabilities are stored in MongoDB through ListingAvailability and ListingAvailabilityTime documents.

  • To create schema

    php bin/console doctrine:mongodb:schema:create

  • To update schema

    php bin/console doctrine:mongodb:schema:update

  • To execute command

    • From Robomongo

      db.getCollection('listing_availabilities').find({"lId": 1926723337, "d": { "$gte" : ISODate("2017-03-20T00:00:00Z"), "$lt" : ISODate("2017-03-21T00:00:00Z") }})

    • From shell

      use cocorico; show collections;db.run.Command(Your command)

Note: For PHP >= 7 use PHP mongodb extension