Dhruv
Dhruv

Reputation: 27

Change database schema cakephp 3 without migrations

I am using cakephp 3. I need to run a script for updating the database schema like adding a column or altering it. I do not wish to use Migrations as it would require me to write scripts for every change. Is there any other way to alter schema of the database if we are neither using migrations nor making changes to the database manually using cakePHP 3?

Upvotes: 2

Views: 567

Answers (1)

Greg Schmidt
Greg Schmidt

Reputation: 5098

You could use the schema system for doing this, which I think would work fine for things like adding user-defined columns. But if you're looking for an easier way to do migrations, you'd need to put that schema-related code somewhere and keep track of which changes have already been made, and then you're basically just re-inventing migrations.

Upvotes: 3

Related Questions