nicholas-ross / SSMS-Schema-Folders

This an extension for SQL Server Management Studio (SSMS). It groups sql objects in Object Explorer (tables, views, etc.) into schema folders.
GNU General Public License v2.0
162 stars 34 forks source link

Temporal table show schema name also if it's the same #43

Open acappelletti opened 9 months ago

acappelletti commented 9 months ago

HI Nicholas,

I inform you of this unexpected behavior at least for me. IF you create a Temporal table...

CREATE TABLE [dbo].[SYBASE_CATALOG](
    [DATABASE] [varchar](100),
    [TABLE_SCHEMA] [varchar](100),
    [TABLE_NAME] [varchar](255),
    [TABLE_REMARKS] [varchar](255) NULL,
    [COLUMN_NAME] [varchar](255),
    [COLUMN_REMARKS] [varchar](255) NULL,
    [COLUMN_DOMAIN] [varchar](255) NULL,
    [COLUMN_SIZE] [int] NULL,
    [PRIMARY_KEY] [char](1) NULL,
    [NULLABLE] [char](1) NULL,
    [DESC_FUNZIONALE] [varchar](8000) NULL,
    [ValidFrom] DATETIME2 GENERATED ALWAYS AS ROW START,
    [ValidTo] DATETIME2 GENERATED ALWAYS AS ROW END,
    PERIOD FOR SYSTEM_TIME(ValidFrom, ValidTo),
    CONSTRAINT [PK_DB__SCHEMA__TABLE__COLUMN] PRIMARY KEY CLUSTERED 
    (
        [DATABASE] ASC,
        [TABLE_SCHEMA] ASC,
        [TABLE_NAME] ASC,
        [COLUMN_NAME] ASC
    )
) WITH (SYSTEM_VERSIONING = ON (HISTORY_TABLE = dbo.SYBASE_CATALOG_HISTORY))

I noticed that in schemas where a table of this type exists the prefix is added in the same way but to all the tables in the schema.

image

ALEN

nicholas-ross commented 9 months ago

It is working ok on my local machine. It could be a timing issue. There are a few things which will change the name and then reset it back to the default. I had to make the rename logic run every time you click the expand icon next to the object.

If you right click on the dbo folder and select Refresh does it still happen?

Is this an Azure SQL DB?

In the options you can try setting the Unresponsive timeout to 3000.

image

acappelletti commented 9 months ago

Hi Nicholas and thanks for your response... now seems all ok...

image

my only observation is that I thought "dbo" was hidden (being the same scheme also for the versioning table) but if it's not possible it's a small annoyance

Alen