Questions tagged [phinx]

Database migration tool for PHP apps.

About

Database migrations tool for PHP apps..Phinx is just about migrations without all the bloat of a database ORM system or framework.

Links

GitHub

Phinx

104 questions
0
votes
1 answer

Reset INSERT queryBuilder for re-use, in Phinx

I'm having a particular problem with Phinx (version 0.10.8): I have to migrate one table as such that that row is inserted one table, and then the AUTO_INCREMENTed last-insert-ID is inserted in another table. Since I am in a for-loop, I'd just like…
WoodrowShigeru
  • 1,418
  • 1
  • 18
  • 25
0
votes
1 answer

Identify faulty foreign-key in MySQL "Integrity constraint violation" (1022) messages

Is there a way to get better debugging information for foreign key violations in MySQL? I'm using Phinx for database migration and I'm dealing with multiple constraints in a row and exception messages like these: Integrity constraint violation: 1022…
WoodrowShigeru
  • 1,418
  • 1
  • 18
  • 25
0
votes
0 answers

How to specify directory path during migrations run

How can I specify the directory to use for migrations while running the migrations with phinx, I am looking for something like vendor/bin/phinx migrate --path = path/to/directory
Shahrukh
  • 102
  • 5
0
votes
1 answer

Does Phinx help in query building

I'm trying to use PHINX as database query builder for SQL database. Does Phinx help only database migrations? The document also has only about configuration and steps for migration. https://phinx.org/ http://docs.phinx.org/en/latest/
Ahalya
  • 1
  • 1
0
votes
1 answer

Phinx seeders work in console but not work in unit test

I have a project made with slim, Eloquent and Phinx and I am integrating PHPunit. Everything works correctly except the new test that I need to perform an information seeder before executing the test. The seed
GoldraK
  • 9
  • 3
0
votes
1 answer

Phinx migration not running on server after commit in SVN repository

We have a SVN repository in a remote server and I have a copy of it in my local machine. We are using phinx for database migrations. So locally I create a migration and run it so I am sure the table is created and it does. The migration file is…
Stefanos
  • 37
  • 3
  • 11
0
votes
1 answer

How can PHP doctrine/phinx migrations be deployed?

I am trying to setup a fairly simple CI/CD toolchain in TravisCI for a PHP project using composer libraries, resulting in deployment on a baremetal server via rsync. Steps are: Getting the code from the Github Repo upon git push. Run composer…
0
votes
1 answer

CakePHP 3.x - Installing Phinx Error

I am currently studying cakePHP 3.x and I ran into some trouble installing phinx. composer require robmorgan/phinx I keep getting the ff error: Problem 1 - cakephp/migrations 1.8.1 requires robmorgan/phinx 0.8.1 -> satisfiable by…
JP Arcilla
  • 29
  • 6
0
votes
1 answer

CakePHP 3 / Phinx exception when runned from the CLI

I have a running CakePHP 3 project on which I use Phinx migrations. This morning I just changed one migration file, didn't do a rollback, but instead I dropped all tables and hoped that it will just re-run the migrations as before. So when I issue…
Zlatan Omerović
  • 3,863
  • 4
  • 39
  • 67
0
votes
1 answer

How to create the following index on Phinx

I'm new to Phinx can anyone tell me how to create 'myindex' so it is defined as KEY myindex (column1, column2(767))
Cranespud
  • 91
  • 1
  • 5
0
votes
1 answer

Migration call a seeder before executing next migration

Using the Phinx there is a way to a specific migration call a seeder before the next migration? Any way to programmatically call a seeder inside a migration?
Marcos
  • 1,240
  • 10
  • 20
0
votes
1 answer

What happens if query fails using phinx-db execute command?

We're using phinx-db for migrations. I'm trying to find out what happens if a query fails using the execute command. The documentation is not clear about this. In other words, if I call $this->execute("my sql statement"); and the statement fails,…
Tim
  • 197
  • 1
  • 1
  • 10
0
votes
0 answers

The requested package robmorgan/phinx No version set (parsed as 1.0.0) is satisfiable by robmorgan/phinx[No version set (parsed as 1.0.0)]

When trying to install phinx executed the below command and it's giving the error as below php composer.phar require robmorgan/phinx Loading composer repositories with package information Updating dependencies (including require-dev) Your…
0
votes
1 answer

Phinx Class Not Found PHP

So I'm trying to set up Phinx a database migrations tool in Slim however, I'm having a little trouble getting the migration to work properly it keeps giving me this error Fatal error: Class 'App\Database\Migrations\Migration' not found in…
Hassan
  • 43
  • 1
  • 3
0
votes
2 answers

PDO connection error when running PHINX migration on a Docker Container

I am trying to run a migration using Phinx from my host machine (OSX Sierra) but I keep getting PDO connection error. It's a simple LAMP stack and is working fine otherwise. Here is my docker-compose: version: '2' services: apache: build: …
Niraj Pandey
  • 309
  • 1
  • 9
  • 21