Giter VIP home page Giter VIP logo

Comments (8)

k-pd avatar k-pd commented on May 14, 2024

Didn't know that project, looks simple. In other projects I simply used some kind of "auto-updating", using a DB field as version and executing SQL files with names < version until up-to-date. No button clicking, no extra dependencies, minimum additional runtime for checking.

from foodcoopshop.

mrothauer avatar mrothauer commented on May 14, 2024

the goals of the tool are:

  1. keeping the db in sync with the source code (for developers)
  2. creating a tool for updating the db from one version to another (eg. FCS 1.1.x to 1.2) (for users)

the easier the better, but i am pretty sure that phinx would be easy to use and does the job. as you wish.

from foodcoopshop.

k-pd avatar k-pd commented on May 14, 2024

Did You know https://github.com/cakephp/migrations before? Its based on Phinx and pretty much what You wish to have. Any experience with backporting from Cake3? Easy or impossible? Much of an advantage: when switching to Cake3 no need to re-do all the migrations stuff.

from foodcoopshop.

mrothauer avatar mrothauer commented on May 14, 2024

sorry, i have no experience with backporting cake3 plugins to cake2. but in that case (plugin for cake3 exists) the migration tool could wait (or maybe a really easy solution in between) until a possible cake update to version 3.

from foodcoopshop.

k-pd avatar k-pd commented on May 14, 2024

I will analyze the cake3 plugin and decide about porting or another solution.

from foodcoopshop.

mrothauer avatar mrothauer commented on May 14, 2024

perfect!

from foodcoopshop.

k-pd avatar k-pd commented on May 14, 2024

Cake2/3 and Phinx don't work correctly with the non-SQL ENUM data type. While Cake2 migrations plugin just does nothing, Phinx and Cake3 drop the columns on table changes. Fix: Replace these fields with an Enum() Cake model. Or a TINYINT for ease of use.

Also there are some problems with Cake2's migrations plugin as some Model booleans are actually used as ints. The values are automatically converted to boolean (0/1) on table changes. Didn't test that with Phinx/Cake3, but that is a hard violation of model goals and must be corrected anyways.

And there are Cake Models defining a PRIMARY KEY different from the DB table definitions. This kills the Cake automatisms used to read and compare schema and migration definitions. Don't know, if not defining these wrong PRIMARY KEYs will brake any Model usage.

To get a quick solution I will use the SQL migration files provided and simply apply them to the database on click. Are there plans to add this to Release 1.2 already?

from foodcoopshop.

mrothauer avatar mrothauer commented on May 14, 2024

#34

from foodcoopshop.

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.