Welcome Guest, Not a member yet? Register   Sign In
Can I replace the system/database directory of version 3.1 into version 2.2?
#1

(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
Reply
#2

Sorry, but that won't work. There are too many other differences in the database driver structure between CI2 and CI3.
Reply
#3

(09-20-2016, 07:57 AM)ciadmin Wrote: Sorry, but that won't work. There are too many other differences in the database driver structure between CI2 and CI3.

I tried it.
It seems work. 
mysqli and pdo both works.

Huh Exclamation

I think I should check the source codes in system/database carefully.
Reply
#4

Hmm - that is unexpected. The database drivers could be more decoupled from the other CI3 components than I thought!
Reply
#5

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.
Reply
#6
Smile 

(09-26-2016, 01:14 PM)mwhitney Wrote: 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.

Thanks for your reply.
Reply
#7

Here's a question: Why?
Reply
#8
Tongue 

You are a cowboy! Smile
Reply
#9

(09-27-2016, 12:21 AM)Narf Wrote: Here's a question: Why?

When I was running 2.x, it was helpful to use pieces of 3.x to patch the system, since a lot of things weren't back-ported. However, that was when 2.x was still somewhat supported.

Now, I'd say it's good if the intention is to move the site to 3.x. However, if it's just to pull some features from 3.x, it's definitely a bad idea. This long after end of life, anyone working on a 2.x site should be spending most of their development time on that site moving it to 3.x.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB