Excellent!! Thank you.
D
On Tuesday, December 30, 2014 8:47:38 PM UTC-6, Ams Fwd wrote:
Blow away the alembic versions table from the database and the folder
with the versions file and patches files on disk and you should be good
to go.
HTH
AM
On 12/30/2014 06:01 PM, dewey wrote:
I've added a naming convention to my metadata object (using declarative):
customMetadata = MetaData(naming_convention=constraintNameConv) #
schema='pay'
Base = declarative_base(cls=DbBase, metadata=customMetadata,
constructor=record_constructor)
and now I'm getting this error when I try to
what kind of constraint has that problem, keep in mind there’s primary key
constraints, there’s a UNIQUE constraint if you say unique=True, etc.
need more info
dewey de...@pathoz.com wrote:
I've added a naming convention to my metadata object (using declarative):
customMetadata =
Thanks very much for the response and I'm not sure how to answer that.
Apart from my entry point:
Base.metadata.create_all(engine)
the stack trace only references SA code. so I don't know which constraint
is causing the problem
I have about 10 tables with a large mix of PKEY, FKEY, index,
I'm currently reflecting a few tables from a MSSQL database and then
creating the table structure over to Postgres. I'm using sqlalchemy 0.9 and
python 2.7.
So far I've been very successful doing this with most of the tables except
on a few tables I've received a
Hi
What would be the most efficient way to loop over a large table(12
rows) and base on some conditions find the match on another table(7
rows)?
Actually i'm working on a given db which there are TableA with 14 fields
and more than 12 rows and TableB with 150 fields and about 7
well seeing the actual naming convention would help…. :)
it looks like a CHECK constraint.
dewey de...@pathoz.com wrote:
Thanks very much for the response and I'm not sure how to answer that.
Apart from my entry point:
Base.metadata.create_all(engine)
the stack trace only references SA
I've checked and I don't have an EXPLICIT check constraints but I
understand thats not definitive.
Here is the pattern:
@event.listens_for(Column, before_parent_attach)
def attach(target, tableObj):
if tableObj.metadata is Base.metadata:
target.name = %s%s % (tableObj.name[0:4],
best way is probably to add it on after the fact. this is the flag but also
because the flag isn’t set up front, seems to need the add/drop directives
to be applied as in
http://docs.sqlalchemy.org/en/rel_0_9/core/ddl.html#controlling-ddl-sequences:
from sqlalchemy.schema import AddConstraint,
dewey de...@pathoz.com wrote:
I've checked and I don't have an EXPLICIT check constraints but I
understand thats not definitive.
OK sometimes these come out for boolean or ENUM fields. For Booleans I’d
probably turn off this constraint, set create_constraint=False:
best way is probably to add it on after the fact. this is the flag but also
because the flag isn’t set up front, seems to need the add/drop directives
to be applied as in
http://docs.sqlalchemy.org/en/rel_0_9/core/ddl.html#controlling-ddl-sequences:
from sqlalchemy.schema import AddConstraint,
Sorry...change which constraint naming pattern?
I'm not tracking what the problem is so following your directions to fix
it has me a bit lost.
What I think you are saying is that SQL alchemy is creating a check(0,1)
constraint for my boolean fields on the mysql server
And that something
12 matches
Mail list logo