trailsjs / sails-swagger

Swagger integration for sails.js
107 stars 47 forks source link

Test models creating database tables #27

Closed RyanParsley closed 1 year ago

RyanParsley commented 8 years ago

Judging by the commit message of "move test models into local project" found here: https://github.com/tjwebb/sails-swagger/tree/v0.5.1/api/models, it looks like the "group" and "contact" tables being created in my database are not necessary. Is there configuration that I'm not aware of to skip these (other than changing the "alter" option to "safe")?

gggordon commented 8 years ago

Hi @RyanParsley , according to the documentation for Waterline ORM being used, you are on the right path. Specifying

migrate:'safe'

in the group and contact models should prevent this.

I cannot test this proposal right now, but will do it later. Did you change the migrate alter to safe in your config/models.js or did you try the above?