cakephp / cakephp/phinx

[nfr] alter/drop/recreate view methods

Open
#588 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Please consider adding some simple functions to manage views:

    $this->alterView('test','select * from ….'); 

Some times views does not works but there is no need to changing them. Only recreating them resolve the issue. So a recreate method is useful as well. (this happens when the referred tables are altered. )

I think alterView should automatically create the view if it does not exist. (so there is no need for createView method.)

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 reviewing Phinx's migration API and database adapter handling for views, then trace how the proposed alterView and recreate behavior would fit with existing view operations. Clarify whether alterView should create missing views and how referenced-table changes are handled. Done means an agreed, documented API and corresponding coverage for altering, recreating, and creating views when absent.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, sql
Domain
databases
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.