Recent database tricks learned

Lately I've been busy working with databases for my spare time projects. I imported a huge dump of data into the db via CSV import, but forgot to add an Unique Id Column (Primary Key). Not willing to do the whole import job again, I searched for a solution ...

View comments.

more ...

How to auto-generate Doctrine db migrations

Because I always seem to forget this (for Symfony 1.4 btw).
(this assumes you have a running system with an existing database)

  • First, edit schema.yml

  • Then run this from the command line:

symfony doctrine:generate-migrations-diff
  • Then run:
symfony doctrine:build --all-classes

A migration will be generated in /lib ...

View comments.

more ...