Giter Club home page Giter Club logo

Comments (5)

from-nibly avatar from-nibly commented on May 18, 2024 1

the config file with -c adds to the sequelize connection object. I forked this repo and am currently requesting a pull. You can use the -a tag or put it in the -c file under the object additional. Let me know if you have problems

here is an example of the config file.

{
    "aditional" :{
      "timestamps": false,
      "freezeTableName": true
    }
}

then just use -c or --config to point at the file containing this json.

NOTE this has not been merged into master and is thus subject to major change. i wouldn't depend on this in production.

from sequelize-auto.

johnraber avatar johnraber commented on May 18, 2024

Any plans to merge this in? Thx for the hard work

from sequelize-auto.

edision avatar edision commented on May 18, 2024

I modified the source code in npm install path;
/bin/sequlize-auto line 34

configFile.host = argv.h || configFile.host || 'localhost';
configFile.aditional = configFile.aditional || null; 

/lib/index.js line 143

...
});
            text[table] += spaces + "}";
            // add aditional options here
            if (self.sequelize.options.aditional !== null) {
              text[table] += ",{\n";
              var aditional = self.sequelize.options.aditional;
              var propertyNames = Object.getOwnPropertyNames(aditional);
              var props = "";
              propertyNames.forEach(function (p) {
                props += spaces + spaces + spaces + p + ": " + aditional[p] + ",\n"
              }, this);
              props = props.substr(0, props.length - 2);

              text[table] += props + "\n  }";
            }

            text[table] += ");\n};\n";
          _callback(null);

it works! ^_^

from sequelize-auto.

from-nibly avatar from-nibly commented on May 18, 2024

i would love to merge it in. just need to sit down and figure out why they are rejecting it.

from sequelize-auto.

durango avatar durango commented on May 18, 2024

It's been merged, closing this comment thanks @from-nibly !

from sequelize-auto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.