cakephp / cakephp/phinx

Migration generator

Open
#350 14 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PHP
Stars
4.5k
Forks
884
PR merge metrics
No merged PRs in 30d

Description

I was looking for a tool to handle the migrations for me (although I am using Doctrine DBAL I am not using Entities or the RM ATM).

Right now I make changes to my local DB and occasionally forget table changes, which of course break code when pushed to staging and worse when they make it to production. Migrations would prevent this. However for speed of work flow (for me personally) it would be nice if an addiitonal command such as "Generator" or "Skeleton" was introduced which allowed Phinx to generate the migrations based on the diff test performed on two databases (either two local DB's or a development VS staging, etc).

Is this completely out of context on what you plan on offering with Phinx? Does your DB API support viewing meta data? Have you considered using the Doctrine DBAL?

Just a thought -- great work BTW -- I will totally use this moving forward until I get everything ported over to ORM.

Alex

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

No files, tests, or entry points are named. Start by reviewing Phinx's database API and migration generation flow, then assess whether Doctrine DBAL can compare two databases and expose the required metadata. Done means agreeing on the scope and producing a generator that creates migrations from a schema diff.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
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.