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
Phinx 0.16
Cookbook
A
Language:
en
Version:
0.16
0.16
Nav
Table of Contents
×
Improve This Doc
Contents
ΒΆ
Phinx
Introduction
Goals
Installation
Writing Migrations
Creating a New Migration
Generating a skeleton migration file
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
The Table Object
Saving Changes
Creating a Table
Determining Whether a Table Exists
Dropping a Table
Renaming a Table
Changing the Primary Key
Changing the Table Comment
Working With Columns
Valid Column Types
Valid Column Options
Limit Option and MySQL
Custom Column Types & Default Values
User Defined Types (Custom Data Domain)
Get a column list
Get a column by name
Checking whether a column exists
Renaming a Column
Adding a Column After Another Column
Dropping a Column
Specifying a Column Limit
Changing Column Attributes
Working With Indexes
Working With Foreign Keys
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
Database Seeding
Creating a New Seed Class
The AbstractSeed Class
The Run Method
The Init Method
The Should Execute Method
Foreign Key Dependencies
Inserting Data
Using The Table Object
Truncating Tables
Executing Seed Classes
Commands
The Breakpoint Command
The Create Command
The Init Command
The Migrate Command
The Rollback Command
The Status Command
The Seed Create Command
The Seed Run Command
Configuration File Parameter
Running Phinx in a Web App
Wrapping Phinx in another Symfony Console Application
Using Phinx with PHPUnit
Configuration
Migration Paths
Custom Migration Base
Seed Paths
Custom Seeder Base
Custom Migration Template
Custom Seeder Template
Environments
Migration Table
Table Prefix and Suffix
Socket Connections
External Variables
Data Source Names
Supported Adapters
MySQL
SQLite
SQL Server
Custom Adapters
Templates
Aliases
Version Order
Bootstrap Path
Feature Flags
Copyright
Introduction
→