DB tools Some useful database commands have been added to Setup plugin 3.8.0+: bin/cake db init This will create the (default) database, if it does not yet exist. Setting up a fresh project or local version of it, the dev…
Tag: Database
CakePHP Tips 2024 Autumn Edition
ORM type map details With the help of the Setup plugin you can get a lot of useful info for your current app setup. One very new useful overview is the ORM type map. It shows the different types and…
Emoji and CakePHP
You might think: Why do I care. Well, you would be surprised – but pretty much any website with at least one form on the page will be affected here. So anyone with even just a basic contact form should…
Schema reference for table less models
If you ever need a table less model with only some manual schema information (mainly for validation and form helper to work), you might find the documentation a little bit incomplete. There are more than just those types available. Here…
Dynamic database switching
Some might remember my old post about development vs. productive setup. It was mainly about how to switch dynamically based on the current environment. This can be useful if you want to have a single DB config file which will…
Development vs. Productive Setup
If you want to deploy your cakephp app you usually have to change a few lines of code. But we want to minimize that. My example setup: development: Windows (>= Vista) productive: Linux (Debian) Database Setup Create a library file…