【发布时间】:2017-11-10 04:27:01
【问题描述】:
我正在使用 Google App Engine 和 Cloud SQL 来运行应用程序。
我已成功设置本地和生产环境及其各自的数据库。刚才,我已经设法使用 Knex 迁移 CLI 在我的本地环境中设置了一些迁移,并且在本地一切正常。
在执行gcloud app deploy 之后(或之前?)如何运行这些迁移(和种子!)?我无论如何都看不到从云外壳中访问我的项目文件。
我错过了什么?
【问题讨论】:
-
我尝试使用
prestart("prestart": "./node_modules/.bin/knex migrate:latest && ./node_modules/.bin/knex seed:run",) 运行迁移,但导致以下错误:googleapi: Error 409: The instance or operation is not in an appropriate state to handle the request., invalidState
标签: node.js google-app-engine google-cloud-sql knex.js gcp