Closed hwakabh closed 2 months ago
For loading fixtures data, there are several packages we can use with TypeORM and its MySQL backend.
Comparing them, typeorm-fixtures
seems to be generally a CLI-based tools, while factory.ts
is implemented by pure TypeScript so that we need to add them into our code bases.
For the purpose of declarative coding, the format of the default data, which would be inserted into MySQL tables, would be better with YAML instead of TypeScript, so we decided to adopt CLI-based typeorm-fixtures
here.
AsIs
We do not have any features of adding default data to MySQL database, so that we need to write & execute SQLs for testing features using database connections. As this task would take so much times, and also for the declarative coding it is better to write default data down as code basis, which we can load to MySQL database with a few command.
ToDo
(Optional) Acceptance criteria
Confirm that we can add default values to MySQL tables with executing a few command
(Optional) Additional contexts
N/A