binarymatt / redshift_sqlalchemy

Amazon Redshift SQLAlchemy Dialect
MIT License
48 stars 21 forks source link

Update dialect to account for unsupported features #11

Closed binarymatt closed 8 years ago

binarymatt commented 10 years ago

There are several items inherited from the PGDialect that this dialect needs to override. Let's record them here and then update the dialect:

scribu commented 8 years ago

I'm having trouble with an auto-incrementing column:

class Article(Base):
    article_id = sa.Column(sa.Integer, primary_key=True)

The SQL that SQLAlchemy generates looks like this:

CREATE TABLE articles (
  article_id SERIAL NOT NULL

but it should look something like this:

CREATE TABLE articles (
  article_id int IDENTITY(0, 1)

http://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_TABLE_examples.html

graingert commented 8 years ago

@scribu please move this issue to https://github.com/sqlalchemy-redshift/sqlalchemy-redshift