Skip to main content
The typeorm-migration tool is used to generate, apply and revert database migrations. It follows the conventions below.
  • The migrations are generated in the db/migrations folder.
  • The database connection is inferred from the DB_XXX environment variables.
  • All entities should be exported from lib/model commonjs module, i.e. the entity classes must be compiled from TypeScript.
Here are some useful commands:
In @subsquid/[email protected], generate -n <name> accepts a custom suffix. The create command does not accept a name value: passing its --name flag creates a true suffix instead. Run create without arguments.