Documentation
Book
API
Videos
Reporting Security Issues
Privacy Policy
Logos & Trademarks
Business Solutions
Swag
Road Trip
Team
Community
Community
Get Involved
Issues (Github)
Bakery
Featured Resources
Training
Meetups
My CakePHP
CakeFest
Newsletter
Linkedin
YouTube
Facebook
Twitter
Mastodon
Help & Support
Forum
Stack Overflow
Slack
Paid Support
B
CakePHP Migrations 4.x
Book
A
Language:
en
fr
ja
pt
ru
Version:
4.x
2.x
3.x
4.x
Nav
Table of Contents
×
Improve This Doc
CakePHP Migrations
Migrations
Installation
Overview
Creating Migrations
Generating migrations from an existing database
Generating a diff between two database states
The commands
Using Migrations for Tests
Using Migrations In Plugins
Running Migrations in a non-shell environment
Feature Flags
Tips and tricks
Writing Migrations
Creating a New Migration
The Change Method
The Up Method
The Down Method
The Init Method
The Should Execute Method
Executing Queries
Fetching Rows
Inserting Data
Working With Tables
Working With Columns
Using the Query Builder
Database Seeding
Creating a New Seed Class
The BaseSeed Class
The Run Method
The Init Method
The Should Execute Method
Foreign Key Dependencies
Inserting Data
Truncating Tables
Executing Seed Classes
Upgrading to the builtin backend
What is the same?
What is different?
Problems with the new backend?
Migrations
→