View Issue Details

IDProjectCategoryView StatusLast Update
0001434Database Workbench v6Meta Data Compare & Migrationpublic2021-06-08 14:01
ReporterMartijn Tonies Assigned To 
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status newResolutionopen 
Summary0001434: Ability to keep Serial from PostgreSQL to SQL Server and convert NEXTVAL default
DescriptionAbility to keep Serial from PostgreSQL to SQL Server and convert NEXTVAL default
Additional InformationI see that you convert the SERIAL data type in IDENTITY but I think it should be maintained as SERIAL now that MS SQL Server has that type of column.

Example (SQL Server migrate script):

--
-- PostgreSQL original table
--
CREATE TABLE public.avvocati (
  cd_avvocato SERIAL,
  ds_avvocato VARCHAR(50) NOT NULL,
  ...
  CONSTRAINT avvocati_pkey PRIMARY KEY(cd_avvocato)
);

--
-- migrated to SQL Server table
--
CREATE TABLE dbo.avvocati (
    cd_avvocato BigInt IDENTITY NOT NULL, ** this should be SERIAL **
    ds_avvocato VarChar(50) NOT NULL,
    ...
    CONSTRAINT PK_avvocati PRIMARY KEY CLUSTERED (cd_avvocato)
)
GO

ALTER TABLE dbo.avvocati
  ADD CONSTRAINT DF_avvocati_cd_avvocato DEFAULT nextval('avvocati_cd_avvocato_seq'::regclass) FOR cd_avvocato
GO

--

The default value (example)

ALTER TABLE dbo.aliquote_iva ADD CONSTRAINT DF_aliquote_iva_aiv_codice DEFAULT nextval('g_tabelle'::regclass) FOR aiv_codice

should be translate with

ALTER TABLE dbo.aliquote_iva ADD CONSTRAINT DF_aliquote_iva_aiv_codice DEFAULT NEXT VALUE FOR dbo.g_tabelle FOR aiv_codice

because "nextval('g_tabelle'::regclass)" is a PostgreSQL only implementation.
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2016-09-16 13:21 Martijn Tonies New Issue
2021-06-08 14:01 Martijn Tonies Project Database Workbench v5 => Database Workbench v6