On Mon, Aug 25, 2008 at 9:13 AM, Luis Villa <[EMAIL PROTECTED]> wrote:
>>> Hmm, this could be related. Admin is a Boolean in the user table. Perhaps
>>> The booleans are not converted correctly
>>
>> I've seen these symptoms before with a conversion from MySQL to sqlite3, and
>> in that case it was -- as Reinier suggests -- a problem with the boolean
>> fields. MySQL uses 1/0 and sqlite3 uses t/f. Rails handles the
>> interpretation of the field depending on the database connection type, but
>> if it's expecting t/f and finds 1/0, things go wrong.
>>
>> I would use the sqlite3 command line tool to explore your database and check
>> the value of the fields:
>>
>>> cd db
>>> sqlite3 your-tracks-db.db
>>
>> sqlite> update contexts
>>  ...> set hide='f'
>>  ...> where hide=0;
>>  ...> select * from contexts;
>>  ...> .q
>>
>> You would do the converse and set hide='t' where hide=1 if you have any
>> hidden contexts, along with any other boolean fields (there's 'done' in
>> todos and couple of others, IIRC, so check the db schema.
>>
>> Then it should work OK.
>
> That's it. Thanks, BSAG!

Note though, that when I ask sqlite to show me .schema, none of these
fields (context.hide, users.is_admin, some of the preferences that I
presume are booleans) are shown as booleans, but rather as integers-
so I'm sort of surprised sqlite prefers them to be t/f instead of 0/1.
It does seem to *work*, so I can't complain, but... that seems odd to
me.

[Tangentially related: when running .schema, every table except
'recurring_todos' is nicely formatted... not sure why that is.]

Luis
_______________________________________________
Tracks-discuss mailing list
[email protected]
http://lists.rousette.org.uk/mailman/listinfo/tracks-discuss

Reply via email to