In db first approach, we already have db, it has two schemas like auth and audit. auth schema contains user, role, permission table, audit schema contains session, policies. how to create model and migration files?
- Posted 1 month ago by
- sivaclikry (@sivaclikry)
Join The Discussion! (1 Replies)
Please sign in or sign up for free to join in on the dicussion.
tomgobich
Hi sivaclikry! As of right now, there is no way to generate models and migrations from an existing database. So, you'll want to manually define the models and migrations you'll need.
I have a package that is a work in progress, you're welcome to try it. It'll generate models for you, but it doesn't currently do migrations. Right now, it'll work best with MySQL & PostgreSQL.
To install, you can run:
Ensure your db connection is defined and working in your
.env
, then generate with:Please sign in or sign up for free to reply