cakephp/cakephp — pull request #1303 by markstory (2013-05-26 03:51:08+00:00)
Title: 3.0 - Fixture create (in progress)

This is a first pass at updating fixtures to use the new Database package and also remove some of the more annoying implementation details from fixtures. It is currently incomplete as I had a few questions that I wanted to get feedback on.

#### Things that changed on purpose

* No more importing from Models - This has caused a number of bugs in the past, and unnecessarily couples the testsuite to models.
* No more importing records - This was just a bad idea. Importing from shifting databases is a bad idea.
* You can now easily setup fixtures that use a pre-built database for testing. By leaving both `$import` and `$fields` undefined the fixture will not create/drop any schema.
* New `constraints` key. Mirrors the one used in the Table class.

### Questions I had

* Should we force everyone to update fixture syntax? Things like `'key' => 'primary'` no longer work. I can either implement shims to make them continue working or write upgrade tool scripts that rewrite fixture files.
* Should we transparently handle indexes? Some indexes are now constraints (unique constraints). Again we can either add shims or use and upgrade tool.

There are problems with SQLite in how it is managing multi row inserts. I'm hoping to get these resolved soon.