migrations icon indicating copy to clipboard operation
migrations copied to clipboard

"Migration XYZ was executed but did not result in any SQL statements." is displayed

Open boteeka opened this issue 11 years ago • 15 comments

"Migration XYZ was executed but did not result in any SQL statements." is displayed after each migration, right after printing the SQL statements that actually have been executed.

boteeka avatar Oct 20 '15 16:10 boteeka

@boteeka are you using ->addSql() in your SQL migration, or are you using the connection directly ?

stof avatar Oct 20 '15 17:10 stof

I am using ->addSql()

boteeka avatar Oct 20 '15 18:10 boteeka

Can you give the exact version of the library you are using ? Use composer show -i doctrine/migrations to get the info if you are using composer

stof avatar Oct 20 '15 18:10 stof

That I can do only tomorrow, but I am on dev-master, so I suspect it is the head of master.

boteeka avatar Oct 20 '15 19:10 boteeka

well, it depends when you locked it

stof avatar Oct 20 '15 19:10 stof

the issue is a bug in #362

stof avatar Oct 20 '15 19:10 stof

Indeed, but composer update has been run today, so should be the latest. But there is no point speculating on it, I'll be able to provide exact info tomorrow.

boteeka avatar Oct 20 '15 19:10 boteeka

Well, as I identified the cause of the issue, I can be sure it is the latest, as the last commit is the merge of the PR

stof avatar Oct 20 '15 19:10 stof

Hello!

I had the same issue today:

$ composer show -i doctrine/migrations
name     : doctrine/migrations
descrip. : Database Schema migrations using Doctrine DBAL
keywords : database, migrations
versions : * dev-master, 1.1.x-dev
type     : library
license  : GNU Lesser General Public License v2.1 only (LGPL-2.1) (OSI approved) https://spdx.org/licenses/LGPL-2.1.html#licenseText
source   : [git] https://github.com/doctrine/migrations.git 68cc7bf629a7c1fc0696e583cc8ed46f897d0afb
dist     : [zip] https://api.github.com/repos/doctrine/migrations/zipball/68cc7bf629a7c1fc0696e583cc8ed46f897d0afb 68cc7bf629a7c1fc0696e583cc8ed46f897d0afb
names    : doctrine/migrations

autoload
psr-4
Doctrine\DBAL\Migrations\ => lib/Doctrine/DBAL/Migrations

requires
doctrine/dbal ~2.2
php >=5.4.0
symfony/console ~2.3
symfony/yaml ~2.3

requires (dev)
doctrine/coding-standard dev-master
doctrine/orm 2.*
johnkary/phpunit-speedtrap ~1.0@dev
mockery/mockery ^0.9.4
phpunit/phpunit ~4.7
satooshi/php-coveralls 0.6.*

slavafomin avatar Oct 30 '15 07:10 slavafomin

Same issue here, with one difference: I'm not running a migration for an known Entity, but rather for a separate table that I handle on my own.

CristianSitov avatar Nov 03 '15 11:11 CristianSitov

I have the same issue with exactly the same configuration as slavafomin. I updated doctrine/migrations today and the issue still exists. Good thing is, it does all the migrations.

stefax avatar Nov 13 '15 12:11 stefax

could the error be a duplicate call of executeRegisteredSql in https://github.com/doctrine/migrations/blob/master/lib/Doctrine/DBAL/Migrations/Version.php#L267 and https://github.com/doctrine/migrations/blob/master/lib/Doctrine/DBAL/Migrations/Version.php#L270 ?

EnoahNetzach avatar Nov 24 '15 10:11 EnoahNetzach

phigate!

ZioMitch avatar Nov 24 '15 11:11 ZioMitch

Fix available in #380

boteeka avatar Nov 27 '15 14:11 boteeka

As said it's fixed and in a release now

mikeSimonson avatar Dec 16 '15 10:12 mikeSimonson