0

I am facing a problem related to the creation of views across multiple RDBMS.

I started from a db in SQLite with a view like this:

create view V001 (viewfield1, viewfield2) as 
select field1, strftime(''%Y-%m-%d %H:%M:%S'', field2) from T001;

being T001 the original table, and being T001.field2 a "datetime" field (is a REAL).

The problem is that if I want to be able to create the same table and view in another RDBMS, for example PostgreSQL, I find that the latter does not have the function strftime but uses other methods to convert between timestamp to strings (to_char).

The question is: does liquibase have a way to adapt to the destination db also in this respect or should I (for example) write one distinct create view statement for each db I want to support (I was thinking to use the attribute rdbms in the changeset element).

Thanks

Tomaso Tosolini
  • 233
  • 2
  • 9

0 Answers0