playframework/playframework — pull request #827 by jroper (2014-08-22 05:18:57+00:00)
Title: [2.1.0] Can't apply Evolutions to MS SQL Server 2008

I'm using Microsoft SQL Server 2008 R2 and my evolution scripts fail to run.
Steps to reproduce:
Create a new play application with play new
Add the microsoft sql server driver sqljdbc4.jar to the "lib" folder
Adjust application.conf to point to a local, running instance of sql server and a freshly created, empty database
Add 1.sql to conf/evolutions/default/ with these contents:
```
# --- !Ups

create table "smi" ("id" INTEGER NOT NULL PRIMARY KEY,"ro_number" VARCHAR(254) NOT NULL);

# --- !Downs

drop table "smi";
```

When I navigate to the application, I get the expected error page 'Database 'default' needs evolution!'
However, when I click 'Apply this script now!' the page simply refreshes and I still see the error.

The play_evolutions table is successfully created, but my table was not created. These lines are in the log file:

```
2013-03-07 12:57:06,040 - [DEBUG] - from com.jolbox.bonecp.PreparedStatementHandle in New I/O worker #1
insert into play_evolutions values(1, 'c46eefa343788f2604ef159f0e0faf0978f19a7c', 2013-03-07, 'create table "smi" ("id" INTEGER NOT NULL PRIMARY KEY,"ro_number" VARCHAR(254) NOT NULL);', 'drop table "smi";', 'applying_up', '')

2013-03-07 12:57:06,060 - [DEBUG] - from com.jolbox.bonecp.PreparedStatementHandle in New I/O worker #1
update play_evolutions set last_problem = '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. [ERROR:273, SQLSTATE:S0001]' where id = 1
```

The problem appears to be attempting to set a column of type "timestamp" with a value of 2013-03-7.
Here's the documentation on Microsoft SQL Server's Timestamp datatype: http://msdn.microsoft.com/en-us/library/ms182776(v=sql.105).aspx
@gissues:{"order":82.05128205128202,"status":"backlog"}