(10-25-2014, 07:42 PM)kilishan Wrote: I'm confused what you mean about the foreign keys and indexes in the migrations. You can always use any SQL you need to - and you're typically only targeting a single database type, right? Also, dbforge already supports adding indexes if you use dbforge when doing migrations.
Also confused about the "managing application and third-party tests" part. How would you want CodeIgniter to handle that? That's more between you and the testing suite you use, right? I mean you need a slightly different setup depending on whether you're using PHPUnit or CodeCeption or SimpleTest.
Yes, I can run custom queries with $this->db->query(), but that is not platform independent. We work for clients who has different type of RDBMSs or not have any: our migrations have to be runnable on MySQL, Postgres and SQLite too. CI3 docs not mention anything about how to create unique or full text indexes, you can create a primary key or a simple index, but its limiting a bit.
CodeIgniter 3 uses PHPUnit as we are, and I think CI should encourage to use that. We need main application tests (application/tests) and module tests which contains the tests and mocks for libraries and models. In the user defined tests we can access all of CI's mocks and we can load mocks from the main application or a module, maybe the loading of mocks should be automatized in some way. If you run the tests on a site, the CodeIgniter and the application specific tests also runs. Later a DOM crawler (for example Mink) should be introduced to test the output of controller actions, but thats a different story...