cakephp / cakephp/phinx

How to make primary key unsigned in an existing table?

Open
#2,135 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Good morning,
since as of phinx 0.13 PKs are unsigned by default, I would like to write a migration to update existing table and make their PKs unsigned, in order to preserve consistency between old and new future tables. I can't find a solution for doing this in the docs, there is a way? Thanks

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

The issue names no file or test. Start by checking Phinx's migration and table-alteration documentation and the APIs for modifying existing primary keys. Confirm whether unsigned primary-key changes are supported by the relevant database adapters; done means documenting a working migration path or clearly recording the limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
database
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.