balderdashy/sails

Assets generation stops prematurely when migrate prompt answered quickly

Open

#6,998 opened on May 24, 2020

View on GitHub
 (3 comments) (0 reactions) (0 assignees)JavaScript (22,778 stars) (1,953 forks)batch import
help wantedhelpful info or workaround

Description

Node version: 12.16.1 Sails version (sails): 1.2.4 ORM hook version (sails-hook-orm): Sockets hook version (sails-hook-sockets): Organics hook version (sails-hook-organics): Grunt hook version (sails-hook-grunt): 1.0.4 Uploads hook version (sails-hook-uploads): DB adapter & version (e.g. sails-mysql@5.55.5): Skipper adapter & version (e.g. skipper-s3@5.55.5):

When lifting sails in development mode, and a migrate setting is not provided, the command prompt asks what you want to do about migration. Meanwhile, asset generation/building continues in the background.

However, if you answer this prompt before asset generation is finished, asset generation terminates prematurely. This results in missing asset files in .tmp/public .

We prefer to not specify a migrate setting because we want to use the prompt to determine how to migrate. If we made no changes to the schema, we will launch in dev under safe. Otherwise, we will use alter, and in rare cases, drop.

Contributor guide