On 10/19/15 3:39 PM, m1yag1 wrote: > I have the following in my upgrade function of the revision file: > > | > | > > defupgrade(): > op.add_column('gates_experiment_users', > sa.Column('experiment_group', > postgresql.ENUM('Control', > 'SPARFA-50', > 'SPARFA-75', > > name='experiment_user_group_enum',create_type=False)))
this is an open issue seen in https://bitbucket.org/zzzeek/alembic/issues/122/type-dialect-specific-autogen-rules and others, the type has to be created manually for now: enum = postgresql.ENUM(...) enum.create(op.get_bind(), checkfirst=False) op.add_column('some_table', Column('some_column', enum)) > > > | > | > > > I keep getting the error: > > | > sqlalchemy.exc.ProgrammingError: (ProgrammingError) type > "experiment_user_group_enum" does not exist > LINE 1: ...ates_experiment_users ADD COLUMN experiment_group > experiment... > ^ > 'ALTER TABLE gates_experiment_users ADD COLUMN experiment_group > experiment_user_group_enum' {} > > | > > > > I've tried to adapt at the code at the following > link: > https://bitbucket.org/zzzeek/alembic/issues/89/opadd_column-and-opdrop_column-should > > I can't seem to get it to work though. I've tried all of the examples > that were posted. I'm not familiar with any of the other methods outside > of the op.add_column commands so I'm a bit lost at what is going on there. > > > > -- > You received this message because you are subscribed to the Google > Groups "sqlalchemy" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to sqlalchemy+unsubscr...@googlegroups.com > <mailto:sqlalchemy+unsubscr...@googlegroups.com>. > To post to this group, send email to sqlalchemy@googlegroups.com > <mailto:sqlalchemy@googlegroups.com>. > Visit this group at http://groups.google.com/group/sqlalchemy. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.