Convert tables from sql server to postgres

Posts   
 
    
mihies avatar
mihies
User
Posts: 800
Joined: 29-Jan-2006
# Posted on: 06-Dec-2015 18:08:25   

I wonder whether there is a way to convert entities that are reverse engineered from SQL Server to PostgreSQL. Or conversion in general. Theoretically I'd do Generate DDL and picking an alternate provider.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 07-Dec-2015 08:41:27   
  • Load project with sqlserver
  • right-click 'relational model data' and select 'add relational model data container'
  • select postgresql in the popup
  • this gives you the relational model data container for postgres in catalog explorer. Now simply right-click 'Entities' and select automap unmapped entities.
  • you should now have tables and mappings to these tables for postgres simple_smile
Frans Bouma | Lead developer LLBLGen Pro
mihies avatar
mihies
User
Posts: 800
Joined: 29-Jan-2006
# Posted on: 07-Dec-2015 09:41:56   

Nice, I never needed this feature and I see it is done as I'd expect simple_smile I'm using 5.0 CTP and there is Sync Relational Model Data, even better. One thing though, converting a non-identity PK from SQL server (non auto incrementing) results in a sequence assigned to Postgresql for some reson. A bug?

I'll post this in CTP forum.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 07-Dec-2015 13:21:39   

That is likely because 'auto-assign sequences to integer pk fields' is set to true. simple_smile

Frans Bouma | Lead developer LLBLGen Pro