Re: [sqlalchemy] Have SQLAlchemy automatically update tables

2015-07-05 Thread Mike Bayer
On 7/4/15 5:09 PM, Chris Norman wrote: Hi all, My name is Chris Norman, and I am a hobbyist programmer in the UK. Firstly, please let me thank the creators for a truly wonderful piece of software! I was starting my application and coding the SQL by hand, which was a pain considering I

Re: [sqlalchemy] Polymorphic many (Messages) to one (User/Group) relationship

2015-07-05 Thread Mike Bayer
On 7/4/15 3:56 PM, Fridtjof Mund wrote: So far I have set up the following: |classUser(Base):__tablename__ ='users'id =Column(Integer,primary_key=True)sent_messages =relationship(Message,backref=sender)received_messages_association

[sqlalchemy] Re: Can't create table with ENUM type column

2015-07-05 Thread sector119
Column(ENUM('copy', 'insert', 'update', name='import_action')) *works* Column(ARRAY(ENUM('copy', 'insert', 'update', name='import_action'))) *doesn't create enum type * -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group

[sqlalchemy] Re: Can't create table with ENUM type column

2015-07-05 Thread sector119
Code below creates enum type, but server_default still doesn't work as I expect )) import_action = ENUM('copy', 'insert', 'update', name='import_action') class Import(Base): __tablename__ = 'import' id = Column(Integer, primary_key=True) name = Column(UnicodeText, nullable=False)

Re: [sqlalchemy] Have SQLAlchemy automatically update tables

2015-07-05 Thread 'Chris Norman' via sqlalchemy
Hi, Thanks for the reply. I'm just reading over the main body of your email again, but I just wanted to reply to the location thing I was on about... I don't think I explained it all that well, so let me give you a use case. I have a player object, called Chris. That player's _location is 3,

[sqlalchemy] Can't create table with ENUM type column

2015-07-05 Thread sector119
Hello, Help me create table with enum type column, SA do not create enum type before table :( And server_default doesn't set value that I expect, actions import_action[] DEFAULT ARRAY['copy'] NOT NULL it set array['copy'], not import_action['copy'] as default... Code and exception: from

Re: [sqlalchemy] Can't create table with ENUM type column

2015-07-05 Thread Mike Bayer
On 7/5/15 3:08 PM, sector119 wrote: Hello, Help me create table with enum type column, SA do not create enum type before table :( this is issue https://bitbucket.org/zzzeek/sqlalchemy/issue/2729/metadatacreate_all-do-not-create-enum-in, please see the workaround there. And

Re: [sqlalchemy] Have SQLAlchemy automatically update tables

2015-07-05 Thread Mike Bayer
On 7/5/15 2:53 PM, 'Chris Norman' via sqlalchemy wrote: Hi, Thanks for the reply. I'm just reading over the main body of your email again, but I just wanted to reply to the location thing I was on about... I don't think I explained it all that well, so let me give you a use case. I have a

Re: [sqlalchemy] Can't create table with ENUM type column

2015-07-05 Thread sector119
Thanks a lot for your help, Michael ! -- 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] convert PostgreSQL to sqlalchemy

2015-07-05 Thread c.buhtz
Could it be possible to use SQLAlchemy with Python3 to convert a PostgreSQL database to a sqlite one? -- 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