Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mssqldef: View definitions are disappeard if views are defined with header comment #442

Open
odz opened this issue Sep 16, 2023 · 0 comments
Assignees
Labels
mssqldef Bugs or feature requests related to SQL Server

Comments

@odz
Copy link
Contributor

odz commented Sep 16, 2023

Platform

  • OS: Linux
  • RDBMS: SQL Server
  • Version: 016.7

Current Schema

-- users table
CREATE TABLE [users] (
  id INTEGER,
  name NVARCHAR(256),
  CONSTRAINT users_pk PRIMARY KEY CLUSTERED (id)
)
GO

-- DUAL table
CREATE VIEW DUAL AS SELECT 'X' AS X
GO

Current output (--export)

CREATE TABLE dbo.users (
    [id] int NOT NULL,
    [name] nvarchar(256),
    CONSTRAINT [users_pk] PRIMARY KEY CLUSTERED ([id]) WITH ( PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF, STATISTICS_INCREMENTAL = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON )
);
GO

Expected output

CREATE TABLE [users] (
  id INTEGER,
  name NVARCHAR(256),
  CONSTRAINT users_pk PRIMARY KEY CLUSTERED (id)
)
GO

CREATE VIEW DUAL AS SELECT 'X' AS X
GO
@odz odz self-assigned this Sep 16, 2023
@k0kubun k0kubun added the mssqldef Bugs or feature requests related to SQL Server label Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mssqldef Bugs or feature requests related to SQL Server
Projects
None yet
Development

No branches or pull requests

2 participants