Hi,
I deployed Retool on AWS ECS Fargate, and have problem with database migration. There is a log after first run:
There are pending database migrations, checking for up-to-date schema in 1 second(s)...
---------------------------
- EXITING RETOOL -
---------------------------
There are 233 pending database migrations. Retool will not start
unless all database migrations have been run.
To run migrate the database, run the following command:
yarn sequelize db:migrate
So I ran that command, and there is an error:
yarn sequelize db:migrate
yarn run v1.22.5
$ ./node_modules/.bin/sequelize --config "$(test -d 'transpiled' && echo './transpiled' || echo '.')/server/config/config.js" db:migrate
Sequelize CLI [Node: 12.22.5, CLI: 5.5.0, ORM: 5.22.3]
[process service types] [ 'MAIN_BACKEND', 'DB_CONNECTOR' ]
Loaded configuration file "server/config/config.js".
Using environment "production".
== 20210902174420-add_page_save_playground_query_saves_playground_query_id_idx: migrating =======
ERROR: Cannot find module '../db/indexManagement'
Require stack:
- /retool_backend/migrations/20210902174420-add_page_save_playground_query_saves_playground_query_id_idx.js
- /retool_backend/node_modules/umzug/lib/migration.js
- /retool_backend/node_modules/umzug/lib/index.js
- /retool_backend/node_modules/sequelize-cli/lib/core/migrator.js
- /retool_backend/node_modules/sequelize-cli/lib/commands/migrate.js
- /retool_backend/node_modules/sequelize-cli/lib/sequelize
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
What can I do now?