laravel-enso/core

Why isn't this a regular migration

jlsjonas opened this issue · 2 comments

This is a question.

Prerequisites

Yes

Description

I was wondering why this isn't done using a regular laravel migration?

https://github.com/laravel-enso/Core/blob/3f93735fbb55891ad0163204b92beb4e7e2301af/src/app/Commands/Upgrade.php#L28-L51

Steps to Reproduce

Expected behavior

Actual behavior

N/A

:)

Enso has right now a total of 92 migrations.

Since we started the project probably we had some hundreds of changes in our initial migrations until now.

Imagine how clean it would look setting up a fresh Enso and having 800 migrations for ~ 50 tables. And probably 500 doing and undoing the same things again and again.

In all of our projects, including the live ones, we decided to take this approach.

Whenever something changes we integrate the change into the initial migration and we use an omnipotent upgrade command to sync the live db.

This way the migrations are really clean and stand as a very helpful documentation for the database. If we need to know something about a table we have it all in one place.

And of course we never use rollback on migrations, not even in local / development. Only fresh --seed

@jlsjonas, can we close this?