luckyframework / luckyframework/avram

Create a task to consolidate migrations

Open
#729 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
Crystal
Stars
183
Forks
67
PR merge metrics
No merged PRs in 30d

Description

After almost a year of working on a new app, I have over 100 migrations. It would be cool if we had some sort of lucky db.migrations.consolidate task that pulled all of this in to a single file.

I have no clue how it would work, but maybe it could just read the SQL itself similar to a db.dump, and throw that in to a series of execute blocks... The type-safety doesn't matter as much at that point because provided that migrations work, then they've already been tested.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing migration commands and the db.dump task mentioned in the issue, then inspect how SQL and execute blocks are represented. Define how db.migrations.consolidate should combine more than 100 migrations into one file while preserving the database schema. Done means the task produces a usable consolidated migration for an existing Postgres database.

Written by the indexing model from the issue text.

Assessment

Tech stack
crystal, postgresql
Domain
database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.