martenframework / marten

The pragmatic web framework.
https://martenframework.com
MIT License
405 stars 23 forks source link

Add a `marten cleardatabase` management command #148

Open treagod opened 7 months ago

treagod commented 7 months ago

Description

Let's introduce a new management command, marten cleardatabase, to provide a convenient way to reset the database by removing all data, effectively setting it to zero.

Background

With the introduction of the seed command (#147) it is useful to not only seed the database, but to also reset it in order to quickly reset the application to a initial state.

Proposed Solution

The marten cleardatabase command shall provide this functionality in a straightforward way. In addition a marten cleardatabase --app=my-app command would only reset the database entries for a specific app