GithubHelp home page GithubHelp logo

Comments (5)

cebe avatar cebe commented on August 11, 2024

I ask the experts: the loss of performance is really relevant?

I do not think it is relevant, if you want to use this feature, you can do it, if not just skipt it.

Having this functionality as an option in Gii would be helpful?

IMO gii generated code is and can only be a template which needs adjustments, and not only by extending the generated class. There are auto generated relation names which may not match your needs, the rules are just a basic set guessed from which in no case ever match the real rules needed in the app if you take it seriously.

If you adjust a table in the DB you can use the gii preview to display the model code and copy the parts that are relevant over to your editor. You may even use "Compare with Clipboard" in PHPstorm to merge the details. I do not think autogenerated, unadjusted code has a valid use case.

from yii2-gii.

thiagotalma avatar thiagotalma commented on August 11, 2024

@cebe Do not you think valid leave open discussion to listen other opinions and suggestions from the community?

Okay. Let's start from the assumption that we will not have an unalterable file.

When we have a very altered class, the display of the difference results in a large colorful mess.

It would be good that the Yii2 help us compare with the version "original" before the last change so we can view and copy only what has really changed in the database. What do you think?

from yii2-gii.

cebe avatar cebe commented on August 11, 2024

we have discussed this many times before (found only #15 but I am sure there were more) and you can even use it this way, not sure what gii must implement for this btw.

as far as I see, the diff view of gii and preview feature already have all you need...

from yii2-gii.

samdark avatar samdark commented on August 11, 2024

Isn't it doing it already? Gii takes current file contents and compares it with what will be generated so it's exactly "original before last change".

from yii2-gii.

thiagotalma avatar thiagotalma commented on August 11, 2024

@samdark, what I meant is to show the difference generated ONLY by changing the database, ignoring any changes made by the developer.

As if it were made a snapshot every change in the database and the comparison made with the snapshot, instead of comparing with the "real" file, as modified by the developer.

This snapshot replace the "base file", simulating a never changed file.

from yii2-gii.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.