Hi, we have a utility-script "schemautil" that allows us to re-create our DB based on the metadata of SA, or simply dump the generated SQL for manual inspection - the latter is used when one writes migration scripts.
Now we noticed a strange behavior: the generated SQL isn't working for postgres anymore. This is how we create the engines: if strategy is None: self.engine = create_engine(dburi) else: self.buf = StringIO() def executor(s): self.buf.write(str(s)) self.buf.write(";\n") self.engine = create_engine( dburi, strategy=strategy, # this is "mock" executor=executor ) self.engine.echo = echo The output is e.g. CREATE TABLE user_db.addresses ( id INTEGER NOT NULL, address_line_1 VARCHAR(100) DEFAULT '' NOT NULL, address_line_2 VARCHAR(100) DEFAULT '' NOT NULL, city VARCHAR(100) DEFAULT '' NOT NULL, zip_postal_code VARCHAR(100) DEFAULT '' NOT NULL, state_region VARCHAR(100) DEFAULT '' NOT NULL, company VARCHAR(100) DEFAULT '' NOT NULL, country_code VARCHAR(2) DEFAULT '' NOT NULL, created DATETIME DEFAULT now() NOT NULL, PRIMARY KEY (id) ); Please note the created-column. It's a DATETIME - something PG doesn't understand. We use SQLAlchemy-0.6beta1dev_r6615 with psycopg2. Any suggestions on how to fix this? Diez
-- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.