GenieFramework / GenieFramework/SearchLight.jl

Generating Migrations file from Models definitions and changes

Open
#51 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
149
Forks
18
PR merge metrics
No merged PRs in 30d

Description

Today you need to specify all the columns from a table in the migrations file and then write them all again in the respective model file. Basically you have to repeat yourself.
Since there isn't yet an official documentation from SearchLight, I was wondering if there is a way to detect the changes from the model definition and generating the migrations file from it, instead of having to repeat yourself two times (also, making the process less prompt to human errors).
This feature will be similar to what Alembic does to generate migrations for SQLAlchemy in python, it sees the changes in a model and generates a migration file only with the changes made to the model.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing how SearchLight currently represents model definitions and migrations, then identify where schema changes could be compared. Done would mean generating a migration containing only changes detected from the model definition, with behavior comparable to the Alembic example described in the issue.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.