[Answered] Manually create migrations

0 votes
asked Oct 20, 2022 in How To & Manuals by frodemm (300 points)
edited Nov 2, 2022 by ludek.vodicka

I have a rather complex Skippermodel from a earlier project. I want to import into a fresh Laravel project..

Is there a way to tell Skipper that some models already have migrations?
Like users, passwordresets and failedjobs are tables created by a fresh Laravel project, so I want these models omitted when I export to ORM. But I want the models in skipper, so I can link relations to them.

/Frode

1 Answer

0 votes
answered Nov 2, 2022 by ludek.vodicka Skipper developer (140,450 points)

Hello Frode,
sorry for the late reply, I missed the notification.

You can do this for example by importing your whole project (from the database for example), creating the first migration, and then marking this migration as non-exportable.

You can find these settings in the migration management dialog->enable/disable migration export

commented Nov 2, 2022 by frodemm (300 points)

I try this. But when I then export, the models like: PasswordReset, FailedJobs and PersonalAccessToken is exported.. normally I do not need Eloquent model for these.

is the field: model-disabled something I can use to prohibit the model from beeing exported to ORM?

commented Nov 2, 2022 by ludek.vodicka Skipper developer (140,450 points)

Ok, so you also need to disable models export, not only migrations ;-)

In this case, you can use model-disabled exactly like you mention. You can use this property on a single entity or you can disable a whole module export

enter image description here

...