[sqlalchemy] How to load sql file during unit test

2015-02-04 Thread Robert Daniels
I thought this would be easy to Google, but could not find anything. Using pyramid+sqlalchemy+postgres. I'm doing some unit tests and I have a large sql file that contains my db schema. The goal is to have the unit test create and populate the database with test data, run the tests, then

Re: [sqlalchemy] What should be the preferred data type for primary key colum if in database(MSSQL) it is defined as Numeric(18,0)

2015-02-04 Thread Anurag Vaishwade
Thanks Michael for your suggestion. On Wednesday, February 4, 2015 at 8:09:15 PM UTC+5:30, Michael Bayer wrote: your tables already exist so stick with BigInteger.Doesn’t make much difference on the client side. Anurag Vaishwade anuragv...@gmail.com javascript: wrote: Hello

[sqlalchemy] Re: How to load sql file during unit test

2015-02-04 Thread Jonathan Vanasco
I use the same stack quite often. For something like that, I usually just have the testing script create the database: os.system(psql -Utestuser testdatabase path/to/script.sql) you can store the db credentials in your shell's env variables. you could do everything through sqlalchemy,

Re: [sqlalchemy] Using multiple binds in SQLAlchemy

2015-02-04 Thread Michael Bayer
Katie Wurman katie.wur...@gmail.com wrote: I’m trying to design an application that has several engines and unique models associated with each engine. Ideally, I’d like to create one base/abstract model per engine, set the bind for those, and have all child models inherit that bind.

[sqlalchemy] Using multiple binds in SQLAlchemy

2015-02-04 Thread Katie Wurman
I’m trying to design an application that has several engines and unique models associated with each engine. Ideally, I’d like to create one base/abstract model per engine, set the bind for those, and have all child models inherit that bind. Unfortunately I can’t seem to figure out how that

Re: [sqlalchemy] What should be the preferred data type for primary key colum if in database(MSSQL) it is defined as Numeric(18,0)

2015-02-04 Thread Michael Bayer
your tables already exist so stick with BigInteger.Doesn’t make much difference on the client side. Anurag Vaishwade anuragvaishw...@gmail.com wrote: Hello Everyone, I am facing issues with defining table's primary key column as Numeric(18,0).I am connecting to a MSSQL