Welcome Guest, Not a member yet? Register   Sign In
Upgrading "system/database" folder breaks my application
#1

[eluser]KeyStroke[/eluser]
Hi,

I'm still using an older version of the "system/database" folder files, because everytime I copy newer files to them, I start getting random database errors (like "unknown column" errors).

The files in the database folder are from a 1.6.x version (can't remember which one). Were there any major changes I should be aware of?
#2

[eluser]TheFuzzy0ne[/eluser]
The change log is your best bet. Failing that, a side-by-side comparison of functions.
#3

[eluser]t'mo[/eluser]
The problem described here (http://ellislab.com/forums/viewthread/70698/) broke my stuff on the upgrade from 1.5.* to 1.6.*.

But, like TheFuzzyOne said, your best bet it to check the change log.
#4

[eluser]SitesByJoe[/eluser]
I find that once in a while I need to install a fresh copy of CI - re-add my files to it and "voila!" it works again. This has happened on numerous upgrade instances (I've been using it since 1.3 or 4)

I'm not sure why it happens but it does once in a great while.
#5

[eluser]KeyStroke[/eluser]
Sorry I forgot to mention that I've actually checked the changelog, but noticed nothing "new" there that would break my current code. I'm using active record for most of my queries. I also assumed that a new release wouldn't simply just break an older code.

@SitesByJoe:
Although that might work, it doesn't sound really practical.
#6

[eluser]SitesByJoe[/eluser]
No, its not practical. However, I've had the same thing happen to me several times over several upgrades, over several years. Keep it as your last resort. I've received the same advice from this forum before too.
#7

[eluser]KeyStroke[/eluser]
So which directory do you specifically replace? or is it the whole thing?
#8

[eluser]SitesByJoe[/eluser]
The whole thing...
#9

[eluser]KeyStroke[/eluser]
Whoa! I just found out what was causing the problem:

I had a few 'where' clauses where the values I was trying to match didn't have space between them and the equal sign like this:
Code:
where('user.city_id=city.id')

I just added some spaces in all instances like this:
Code:
where('user.city_id = city.id')

And now it works fine. Really weird. :S
#10

[eluser]Colin Williams[/eluser]
Hrm.. might be a bug with _protect_identifiers()

Maybe it's escaping the whole thing as a column name, like `user.city_id=city.id`




Theme © iAndrew 2016 - Forum software by © MyBB