Do you mean things like adding fields to a table and having these
fields also be added to users with existing databases?
I haven't done that much with sqlite on android yet, but I can see
where problems would occur.
But I *think* the sql api has functions to create and alter tables to
meet the latest version of your column definitions.

I've also been using ORMLite lately, so you don't have to worry too
much even about writing sql.
It also has to do with how you setup your columns and data so that you
can plan on adding more fields or values in the future.
For sqlite this shouldn't be an issue, since you can always alter a table.

What I like to do is, instead of having a single sql file the creates
and defines tables, I add a sql command to a file that modifies the
existing database.
Then, when an existing installation needs to be updated to the latest
sql version you can run the files in order of date created and the
database changes should be replicated in order.

On Wed, Aug 3, 2011 at 5:35 PM, Indicator Veritatis <mej1...@yahoo.com> wrote:
> Please lower the voltage: you and Mark are actually talking about two
> different, though likely related, issues. You complained that the user
> "cannot open their newer SQLite database on an older version of
> SQLite. " , Mark responded that the actual file format has not
> changed. But it it far from clear that it is the changes (or lack of
> them) in the file format that are blocking the user from upgrading. It
> could be an overprotective and clumsy version number check (that
> blocks them) for all we know. Or do you have specific evidence that it
> was a change in format that caused the problems you mention?
>
> On Aug 3, 6:08 am, Zsolt Vasvari <zvasv...@gmail.com> wrote:
>> Well, that's a absolutely not true.  I have had at least 10 users with
>> this problem. One guy actually wrote to me today who tried going back
>> to Froyo from Gingerbread and couldn't open his database.   I also
>> created a database in a cyogenmod emulator session and the database
>> shows up as "corrupt " when trying to open it from a normal Android
>> command line SQLite session.  It's easy enough for you to try if you
>> don't believe me.
>>
>> On Aug 3, 7:01 pm, Mark Murphy <mmur...@commonsware.com> wrote:
>>
>> > On Wed, Aug 3, 2011 at 6:53 AM, Mark Murphy <mmur...@commonsware.com> 
>> > wrote:
>> > > On Wed, Aug 3, 2011 at 2:53 AM, Zsolt Vasvari <zvasv...@gmail.com> wrote:
>> > >> For example, if the user moves to a phone with an older version of
>> > >> Android, I can support that older version of the platform just fine,
>> > >> but the user is Sh*t-out-of-Luck trying to move their database over
>> > >> and they cannot open their newer SQLite database on an older version
>> > >> of SQLite.
>>
>> > > Got any examples? AFAIK, the SQLite file format has not changed in some 
>> > > years.
>>
>> >http://www.sqlite.org/formatchng.html
>>
>> > According to the SQLite folks, there hasn't been an on-disk file
>> > format change since 2006.
>>
>> > --
>> > Mark Murphy (a Commons 
>> > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>>
>> > Android Training in NYC:http://marakana.com/training/android/
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
~ Jeremiah:9:23-24
Android 2D MMORPG: http://solrpg.com/, http://www.youtube.com/user/revoltingx

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to