internalfx/rethinkdb-regrid

table 'files' is not being created

Closed this issue · 2 comments

Hi,
with the following code the table 'example is not being created in RethinkDB. For testing purposes I changed the table name in your test code and those tables are not being created as well. Any idea ?

Cheers, Mike

var ReGrid = require('rethinkdb-regrid')

var bucket = ReGrid({db: 'example'})

// initBucket creates tables and indexes if they don't exist, returns a promise.
bucket.initBucket().then(function () {
// We are now ready to read and write files

// Watch a filename for changes
bucket.watchFilename('/videos/myVid.mp4').then(function (cursor) {
cursor.each((err, changes) => {
console.log(changes)
})
})

example is the name of the database you are connecting to.

If you want to control the name of the tables, you need to use the bucketName option.

var bucket = ReGrid({db: 'mydatabase'}, {bucketName: 'mybucket'})

Thx a lot . Will try ... :-) Nice weekend