On Fri, Sep 11, 2009 at 12:04 AM, Jules Stevenson
<[email protected]> wrote:
>
>> What do you mean when you say "importing a slightly modifed model on each
>> client machine"? How different is it and why?
>
> I had to change the binding in the model file, so originally it read:
>
> Session = scoped_session(sessionmaker(autoflush=True, transactional=True,
>
> bind=config['pylons.app_globals'].sa_engine))
>
> Now it reads:
>
> engine = create_engine('sqlite:///C:/ark/data/project.db')
>
> Session = scoped_session(sessionmaker(autoflush=True, transactional=True,
>                                       bind=engine))
>
> (I'm testing the database on a local drive atm).
>
> I'll look into using MySQL, the idea of transferring db's terrifies me
> somewhat, but I'm sure I'll get there :).

The main differences I've seen with MySQL compared to SQLite off the
top of my head are:
- Rigid column lengths (SQLite stores long values; MySQL truncates
them with a warning)
- Different date handling functions (you'll need if-blocks in your
code; e.g., if engine.name=="mysql")
- Different autoincrement policy (not really an issue)
- String comparisons are case insensitive (though I think SQLite's
LIKE is case-insensitive)

-- 
Mike Orr <[email protected]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to