cakephp / cakephp/phinx

Rows are locked

Open
#2,049 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

support waiting on feedback
Dominant language
PHP
Stars
4.5k
Forks
884
PR merge metrics
No merged PRs in 30d

Description

When migrating with the following change function, the columns appear locked in pgAdmin 4. How can I prevent them from being locked? I see no difference with the migrations I have that are unlocked other than that there's no primary_key (and can't be).

    public function change()
    {
        $table = $this->table('events', ['id' => false]);
        $table->addColumn('id', 'uuid', ['default' => \Phinx\Util\Literal::from('uuid_generate_v4()')])
            ->addColumn('data', 'jsonb')
            ->addColumn('created_at', 'datetime', ['timezone' => false,  'default' => \Phinx\Util\Literal::from('now()')])
            ->create();
    }

How can I solve this?

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 reproducing the shown change() migration against PostgreSQL and inspect the resulting events table in pgAdmin 4. Determine whether the reported locked columns are actual database locks or a pgAdmin state, then document the configuration or migration change that prevents the behavior and verify it after rerunning the migration.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, postgresql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.