EpicsDAO / zapp

⚡Rust Serverless Framework
Apache License 2.0
11 stars 3 forks source link

[GEN] `sea-orm` uses migration based approach #22

Open JonasCir opened 1 year ago

JonasCir commented 1 year ago

General

seo-orm in general uses a migration based approach, which means that migrations provided by the developer are used to generate the entity code.

Since we are completely based on sea-orm we should follow this approach.

Proposed change

Introduce the following new gen commands:

  1. gen migration: Use sea-orm-cli migrate generate my_new_table -u programmatically
  2. gen model: Use sea-orm-cli migrate fresh programatically (we probably want a dedicated DB for generation and one DB for the user to tests its app)
  3. gen graphql: Use templating of GraphQL, later switch to Seaography