[sqlalchemy] ProgrammingError: cannot determine type of empty array even with proper model declaration?

2013-12-03 Thread Michael Nachtigal
Hello, all, I'm receiving this error: ProgrammingError: (ProgrammingError) cannot determine type of empty array It looks like this is happening because the default value for column in new instances of one of my models is being initialized to [] (an empty array, no inner type), despite my

Re: [sqlalchemy] ProgrammingError: cannot determine type of empty array even with proper model declaration?

2013-12-03 Thread Gunnlaugur Thor Briem
Hi, 1. the server_default=... argument just says what default to define for the column *on creation* --- it has no effect if the table already exists. To apply the default to an existing table, you need to execute something like: ALTER TABLE mytbl ALTER COLUMN mycol ADD DEFAULT

RE: [sqlalchemy] ProgrammingError: cannot determine type of empty array even with proper model declaration?

2013-12-03 Thread Michael Nachtigal
] ProgrammingError: cannot determine type of empty array even with proper model declaration? Hi, 1. the server_default=... argument just says what default to define for the column *on creation* --- it has no effect if the table already exists. To apply the default to an existing table, you need

Re: [sqlalchemy] ProgrammingError: cannot determine type of empty array even with proper model declaration?

2013-12-03 Thread Michael Bayer
Thor Briem [gunnlau...@gmail.com] Sent: Tuesday, December 03, 2013 8:35 AM To: sqlalchemy Subject: Re: [sqlalchemy] ProgrammingError: cannot determine type of empty array even with proper model declaration? Hi, 1. the server_default=... argument just says what default to define