I tried to use the driver with Scala Play Framework but to support the "evolutions" (aka "migrations") feature Play creates tables with DDL using types incompatible with Spanner's eg.
create table ${schema}play_evolutions (
id int not null primary key,
hash varchar(255) not null,
applied_at timestamp not null,
apply_script text,
revert_script text,
state varchar(255),
last_problem text
)
from the source in Github
Although Play specifically could be updated to support Spanner DDL directly (as for Oracle, SQL Server etc.) it occurs to me that if there was a way to map types like int to int64, varchar(x) to string(x), text to string, and collate primary key attributes into a primary key (...) declaration then we'd get wider compatibility beyond Play.
This may not be in the spirit of what JDBC drivers are supposed to do but if possible perhaps it could be turned on only via xxxSQLCompatability=true driver flag?
Alternatively I can create a PR for Play Framework to add Spanner support but given you have the only DDL supporting JDBC driver so far they may not want to do that being such a niche case.
I tried to use the driver with Scala Play Framework but to support the "evolutions" (aka "migrations") feature Play creates tables with DDL using types incompatible with Spanner's eg.
from the source in Github
Although Play specifically could be updated to support Spanner DDL directly (as for Oracle, SQL Server etc.) it occurs to me that if there was a way to map types like
inttoint64,varchar(x)tostring(x),texttostring, and collateprimary keyattributes into aprimary key (...)declaration then we'd get wider compatibility beyond Play.This may not be in the spirit of what JDBC drivers are supposed to do but if possible perhaps it could be turned on only via
xxxSQLCompatability=truedriver flag?Alternatively I can create a PR for Play Framework to add Spanner support but given you have the only DDL supporting JDBC driver so far they may not want to do that being such a niche case.