CakePHP
  • 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
CakePHP

B CakePHP Migrations 4.x Book

Language:
  • en
    • fr
    • ja
    • pt
    • ru
Version:
  • 4.x
    • 2.x
    • 3.x
    • 4.x

Improve This Doc

CakePHP Migrations

  • Migrations
    • Installation
    • Overview
    • Creating Migrations
    • Generating migration snapshots from an existing database
    • Generating a diff
    • Applying Migrations
    • Reverting Migrations
    • View Migrations Status
    • Marking a migration as migrated
    • Seeding your database
    • Generating a dump file
    • Using Migrations for Tests
    • Using Migrations In Plugins
    • Running Migrations in a non-shell environment
    • Feature Flags
    • Skipping the schema.lock file generation
    • Deployment
    • Alert of missing migrations
    • IDE autocomplete support
  • Writing Migrations
    • Creating a New Migration
    • The Change Method
    • The Up Method
    • The Down Method
    • The Init Method
    • The Should Execute Method
    • Working With Tables
    • Adding Columns
    • Checking Columns
  • Using the Query Builder
    • Selecting Fields
    • Where Conditions
    • Aggregates and SQL Functions
    • Getting Results out of a Query
    • Creating an Insert Query
    • Creating an update Query
    • Creating a Delete Query
  • Executing Queries
    • Fetching Rows
    • Inserting Data
  • Database Seeding
    • Creating a New Seed Class
    • The BaseSeed Class
    • The Run Method
    • The Init Method
    • The Should Execute Method
    • Foreign Key Dependencies
    • Calling a Seed from another Seed
    • 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 →
‹ Back to CakePHP Cookbook

CakePHP Migrations

  • Migrations
  • Writing Migrations
  • Using the Query Builder
  • Executing Queries
  • Database Seeding
  • Upgrading to the builtin backend
openHub
pingping.io
Linode
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Reporting Security Issues
  • Privacy Policy
  • Logos & Trademarks
  • 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

Copyright ©2025 Cake Software Foundation, Inc. Last updated on Oct 17, 2025. Created using Sphinx 7.0.1.