S
S
sawa42016-06-23 07:01:04
Laravel
sawa4, 2016-06-23 07:01:04

How to populate table via Laravel 5 migration without seed?

Everyone will accept!
Is it possible to create migrations to populate a DB without a seed, and how is this done?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2016-06-23
@sawa4

Take and fill directly in the migration by standard means: through models or simply through QueryBuilder.
It can be difficult to rollback only such migrations (when data, for example, is added to a table ), but sometimes you cannot do without them. Seeds are really not a suitable tool for filling out some directories.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question