0
Under review

Import of table and column descriptions from SQL not working

Mohit Vashisht 2 years ago updated by Michał Kołodziejski 2 years ago 1

I need to migrate over existing model with 150 tables from another tool to vertabelo along with descriptions through SQL export-import? Right now tables are getting imported but no table descriptions or column descriptions are imported. How to do that?

Under review

We have some support for descriptions.


In case of SQL Server, comments will be parsed and imported if your DDL looks like this:


CREATE TABLE client (
    id int  NOT NULL,
    full_name varchar(255)  NOT NULL,
    email varchar(255)  NOT NULL,
    CONSTRAINT client_pk PRIMARY KEY  (id)
);
  EXEC sp_addextendedproperty
    @name  = N'MS_Description',
    @value = N'Clients data',
    @level0type = N'SCHEMA',
    @level0name = 'dbo',
    @level1type = N'TABLE',
    @level1name = 'client'; EXEC sp_addextendedproperty
     @name = N'MS_Description',
     @value = N'Client identifier',
     @level0type = N'SCHEMA',
     @level0name = 'dbo',
     @level1type = N'TABLE',
     @level1name = 'client',
     @level2type = N'COLUMN',
     @level2name = 'id';

You can try to import it and you'll be able to see a table comment as well as "id" column comment.

Hope this helps.