Socket
Book a DemoInstallSign in
Socket

rethinkdb-tabel-deps

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rethinkdb-tabel-deps

Create depended dbs and tables (+index) from a json file

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

Let this stupid module create your db`s

I wrote this module because I was bored to write the world biggest waterfall to create all of my db`s and table`s and indexes for my applications.

Example

const depCreator = require("rethinkdb-tabel-deps");

new depCreator({
    // Options for r.connect()
    con_options: {},
    // List of dbs to create
    dbs: [
        {
            name: "niceDB1",
            // If this is true, the db will be deleted at startup and recreated
            recreate: false,
            tables: [
                {
                    name: "table1",
                    recreate: false,
                    indexes: [
                        {
                            name: "testIndex",
                            // Index options
                            options: {
                                multi: false,
                                geo: false
                            },
                            recreate: false
                        }
                    ]
                }
            ]
        },
        {
            name: "beautifulDB",
            recreate: true,
            tables: [
                {
                    name: "superTable"
                }
            ]
        }
    ]
}).doYourJob((err) => {
    if (err) console.error(err);
    console.log("I created this sh**t for you.");
});

Keywords

rethinkdb

FAQs

Package last updated on 26 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts