sails-swagger icon indicating copy to clipboard operation
sails-swagger copied to clipboard

Test models creating database tables

Open RyanParsley opened this issue 8 years ago • 1 comments

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")?

RyanParsley avatar Apr 19 '16 17:04 RyanParsley

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?

gggordon avatar Apr 27 '16 19:04 gggordon