Quantcast
Viewing latest article 1
Browse Latest Browse All 6

Debugging doctrine:data-load

I know it drives you MAD when you try to load a bunch of features and get an error like:

1
SQLSTATE[23000]: Integrity CONSTRAINT violation: 1062 Duplicate entry '16' FOR KEY 'PRIMARY'

Image may be NSFW.
Clik here to view.

Luckily there’s an undocumented argument on doctrine’s data-load task:

–trace

1
2
3
4
5
6
7
8
9
10
$ php symfony doctrine:data-load --trace

>> doctrine Loading data fixtures from "/home/bla/public_html/site/data/fixtures"
>> doctrine Loading data fixtures from "/home/bla/public_html/site/plugins/sfDoctrineGuardPlugin/data/fixtures"
>> Doctrine_Connection_Mysql exec : SET NAMES 'UTF8' - ()
>> Doctrine_Connection_Mysql exec : DELETE FROM table_a - ()
>> Doctrine_Connection_Mysql exec : DELETE FROM table_b - ()
>> Doctrine_Connection_Mysql exec : DELETE FROM sf_guard_user - ()
>> Doctrine_Connection_Statement execute : INSERT INTO sf_guard_user (algorithm, is_active, is_super_admin, first_name, last_name, email_address, username, salt, password, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) - (sha1, 1, 1, bla, blah, blah@adclick.pt, blah, blah48ca1e4247258a0ec29f9d1aac8, blah32ed46c3a74deebb071456114e4406eba42e, 2012-01-12 18:07:02, 2012-01-12 18:07:02)
...

Viewing latest article 1
Browse Latest Browse All 6

Trending Articles