probably (maybe we should improve on our end, though).  but when you’re 
autoloading, you can set this default up automatically using the column_reflect 
event:

http://docs.sqlalchemy.org/en/rel_0_9/core/events.html?highlight=column_reflect#sqlalchemy.events.DDLEvents.column_reflect
 
<http://docs.sqlalchemy.org/en/rel_0_9/core/events.html?highlight=column_reflect#sqlalchemy.events.DDLEvents.column_reflect>

as you receive events here, look at the “type” to see if its TIMESTAMP, and if 
so, populate the column_info dictionary with column_info[‘default’] = 
FetchedValue().


> On Nov 14, 2014, at 7:04 AM, mdob <mike.dobrzan...@gmail.com> wrote:
> 
> Hi, 
> 
> It's been some time since this topic was created. Has anything changed on 
> that matter or manually setting column.server_default=FetchedValue() is still 
> the best way to do it?
> 
> 
> Kind regards, 
> Michał
> 
> On Thursday, September 15, 2011 7:58:49 AM UTC+2, Matt Bodman wrote:
> Hi, 
> 
> I am autoloading tables from an MSSQL db.  A lot of the tables have 
> the MSSQL TIMESTAMP column.  So, when inserting to the table, I get an 
> IntegrityError: 
> 
> sqlalchemy.exc.IntegrityError: (IntegrityError) ('23000', '[23000] 
> [FreeTDS][SQL Server]Cannot insert an explicit value into a timestamp 
> column. Use INSERT with a column list to exclude the timestamp column, 
> or insert a DEFAULT into the timestamp column. (273) (SQLPrepare)' 
> 
> Is there a way around this without having to map every column 
> explicitly? 
> 
> Thanks, 
> 
> Matt 
> 
> 
> -- 
> 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 
> <http://groups.google.com/group/sqlalchemy>.
> For more options, visit https://groups.google.com/d/optout 
> <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.

Reply via email to