Hi All
I'm writing a metadata based schema migration tool.
As SQLAlchemy doesn't support much schema modification. I will
implement a complete set of schema migration functions one way or
another for several of the SQLAlchemy supported databases.
My question is, Where should these function
I create a small (4 lines) patch for databases/postgres.py
def _append_from(self, text, stmt):
return text.replace(' WHERE', ' FROM ' + string.join([table.name
for table in stmt.kwargs['postgres_from']], ', ') + ' WHERE')
def visit_update(self, update_stmt):
text = super(PGCompiler,
On Thu, Mar 5, 2009 at 10:03 AM, jarrod.ches...@gmail.com
jarrod.ches...@gmail.com wrote:
I'm writing a metadata based schema migration tool.
Keep in mind there are some other projects like
http://code.google.com/p/sqlalchemy-migrate/
HTH
--
Lawrence Oluyede
[eng] http://oluyede.org -
visit_update() would have to be rewritten in the base compiler to
support addition of extra components.
On Mar 5, 2009, at 5:05 AM, sector119 wrote:
I create a small (4 lines) patch for databases/postgres.py
def _append_from(self, text, stmt):
return text.replace(' WHERE', ' FROM '
Hello everyone,
So I've got this piece of code:
selectexpr = session.query(Host, Architecture, OS_Kind)
selectexpr =
selectexpr.filter(Host.Architecture_id==Architecture.id).filter(Architecture.Architecture=='IBM
xSeries')
selectexpr =
hi alchemysts,
as of end of march 2009 there will be version of PostgreSQL
(hopefully, finally;) that will support recursive sqls (WITH
RECURSIVE...) and there are also at least 4 other main SQL that
already support it (DB2, MSSQL, Firebird, Oracle (syntax diff)), do
you have plans for adding
its something we should take on at some point, yes, but no concrete plans
have been made.each DB has a different take on it and the common set
of functionality would need to be extracted.
che wrote:
hi alchemysts,
as of end of march 2009 there will be version of PostgreSQL
(hopefully,
I have a many-to-many mapping that joins against a single table. The
relation works fine, except when I try to add a new mapping via the
list created by relation(). To make things extra interesting, I'm
using declarative (which I really like, actually, because it maps in a
fairly straightforward
Hi everyone!
I'm looking for a way to handle database migrations/upgrades and found
projects such as sqlalchemy-migrate and mikuru.. My understanding is
that those projects expect the model to be in NON-declarative form,
that is, with users_table = Table(...) and the like.. But what if my
program
On Thu, Mar 5, 2009 at 12:17 PM, Joril jor...@gmail.com wrote:
I'm looking for a way to handle database migrations/upgrades and found
projects such as sqlalchemy-migrate and mikuru.. My understanding is
that those projects expect the model to be in NON-declarative form,
that is, with
as i see u have normal mapping for the Connection, and still use it as
secondary table; once i did use such (semi-legal?:) thing but the relation
was readonly.
try not giving secondary* args ?
On Thursday 05 March 2009 18:37, Kevin Dangoor wrote:
I have a many-to-many mapping that joins
make those m2m relations(), and any other relation that doesn't represent
a single path of persistence, viewonly=True . its all the three ways to
see the same thing going on, minus viewonly=True means three ways to
persist the same thing, leading to errors like that.
Kevin Dangoor wrote:
I
im finding it easiest to just autoload the tables in my migrate script.
That way there's no cut and paste the table def going on, you just load
them as they are from the DB. and the schema definition stays in the
database for those who get bent out of shape about that. problem solved.
the
The problem with the connection being returned to the pool was due to
executing the SET IDENTITY_INSERT statement on the *cursor* rather
than the *connection*. The documentation states that the connection
will be returned to the pool when a statement is executed on it that
doesn't return any
Hi there,
Could someone explain me a bit what this error message means and what
could be causing it:
sqlalchemy.exc.ArgumentError: Could not locate any equated, locally
mapped column pairs for primaryjoin condition 'pages.author_id =
users.id' on relation Page.author. For more relaxed rules on
On Thu, Mar 5, 2009 at 12:38 PM, Michael Bayer mike...@zzzcomputing.com wrote:
make those m2m relations(), and any other relation that doesn't represent
a single path of persistence, viewonly=True . its all the three ways to
see the same thing going on, minus viewonly=True means three ways
Yes, Option 2 - However, From the example documentation, Its doesn't
implement everything.
Although its most of the way there - So option 2 is looking good to
me.
On Mar 6, 1:23 am, Lawrence Oluyede l.oluy...@gmail.com wrote:
On Thu, Mar 5, 2009 at 10:03 AM, jarrod.ches...@gmail.com
if there's an incompatible foreign_keys collection specified that can also
lead to this error. the Page and User classes must map the author_id and
id columns normally as well, i.e. no exclude_columns or relations getting
in the way.
Alex Marandon wrote:
Hi there,
Could someone explain me
phrrn...@googlemail.com wrote:
Sybase (and SQL Server) support cross-database JOINs (Sybase even
supports cross-database foreign-key constraints). There are four
components to an object identifier:
1 = Object name
2 = Schema name
3 = Database name
4 = Server name
the dataserver,
Don't use scoped_session--you'll run into problems no matter what you
do. I'm using Perspective Broker from Twisted with SQLAlchemy. I
make sure to create and commit/rollback a session for *every* PB
request. It works perfectly, and that's the only way I was really
able to get it to work in
I want to use MySQL's uuid() function to create default values for a
column. I need to convert the output of uuid() to utf-8 however, so
the full function in SQL looks like this:
CONVERT(UUID() USING utf8)
I can't set this as a column default using the func.function() syntax,
because python
OK. If it might be as easy as that, I will have a go and see how well
it works.
pjjH
On Mar 5, 4:31 pm, Michael Bayer mike...@zzzcomputing.com wrote:
phrrn...@googlemail.com wrote:
Sybase (and SQL Server) support cross-database JOINs (Sybase even
supports cross-database foreign-key
how about func.convert(literal_column(UUID() USING utf8))
Bryan wrote:
I want to use MySQL's uuid() function to create default values for a
column. I need to convert the output of uuid() to utf-8 however, so
the full function in SQL looks like this:
CONVERT(UUID() USING utf8)
I can't
23 matches
Mail list logo