src/infra/src/table/entity/README.md
This directory contains entity models automatically generated by sea-orm-cli from the most current database schema.
To regenerate entity models first run the application to execute all pending database migrations. Then run the following command from within the root of the repository.
Be sure to replace YOUR_DATABASE_URL with the database connection string. Alternatively, if you set the environment variable DATABASE_URL to the database connection string, then you can omit the --database-url parameter from the command below.
sea-orm-cli generate entity \
--output-dir src/infra/src/table/entity \
--date-time-crate chrono \
--ignore-tables file_list_deleted \
--ignore-tables file_list_history \
--ignore-tables file_list_jobs \
--ignore-tables file_list \
--ignore-tables legacy_records \
--ignore-tables meta \
--ignore-tables pipeline \
--ignore-tables records \
--ignore-tables scheduled_jobs \
--ignore-tables schema_history \
--ignore-tables seaql_migrations \
--ignore-tables seaql_migrations_cloud \
--ignore-tables short_urls \
--ignore-tables stream_stats \
--ignore-tables org_invites \
--ignore-tables organization_usage \
--ignore-tables customer_billings \
--database-url YOUR_DATABASE_URL
We use the --ignore-tables parameter to omit model generation of existing tables for which automatic model generation is not needed yet. In the future we can include these tables in the automatic model generation when we want to start using sea-orm as the means of interacting with these tables.