yiisoft / yiisoft/db-migration
Not a bug, but a proposal for an upgrade/feature on migrations
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 32
- Forks
- 18
- Avg merge
- 22h 18m
- Merged PRs (30d)
- 2
Description
As I said in the title, this is not a bug, but a proposal (didn't know where to write this that would be seen.
Now, on my project I have a big database (not in terms of data but in terms of tables and columns in those tables), and I also have a lot of indexes.
I noticed today that I need to write in a migration class
$this->createIndex('name', 'table', ['columns'])
after creating a new table, what I'm thinking should be a good idea is to add a possibility for method chaining on "createTable" function where I wouldn't need to enter table name for every index.
Or perhaps another parameter in createTable function that would easily let me add indexes in one place.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the migration API around createTable and createIndex, including how a migration class currently creates tables and indexes. Clarify whether chaining or an additional createTable parameter is intended, then define completion as allowing indexes to be declared with the new table without repeating its name.
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
- Mostly clear
- Newbie friendliness
- 30/100