Posts: 3
Threads: 1
Joined: Sep 2016
Reputation:
0
09-20-2016, 06:53 AM
(This post was last modified: 09-20-2016, 09:19 AM by afon.)
One of my projects is using CI 2.2.
And I want to use the PDO driver.
But I don't want to upgrade to 3.1.
If I only replace the system/database directory using 3.1, can it work well?
Thanks.
ps: replace the whole system/database directory
Posts: 1,321
Threads: 21
Joined: Jan 2014
Reputation:
70
Sorry, but that won't work. There are too many other differences in the database driver structure between CI2 and CI3.
Posts: 1,321
Threads: 21
Joined: Jan 2014
Reputation:
70
Hmm - that is unexpected. The database drivers could be more decoupled from the other CI3 components than I thought!
Posts: 1,101
Threads: 4
Joined: Nov 2014
Reputation:
95
The most significant changes to the database library were internal or in the form of additions to the API, so most things will probably work. The big issue is that it's an untested combination, and you'll probably find that any issues you do have will be difficult to troubleshoot, hard to track down, and definitely unsupported. You'll also still have most of the security issues in CI2 to worry about.
It's actually pretty amazing how many of the CI3 components can be swapped into CI2 with very few issues, but it requires a lot more attention to detail than just upgrading the whole thing at once.