Title: Indexes are not scripted correctly · Issue #166 · OpenDBDiff/OpenDBDiff · GitHub
Open Graph Title: Indexes are not scripted correctly · Issue #166 · OpenDBDiff/OpenDBDiff
X Title: Indexes are not scripted correctly · Issue #166 · OpenDBDiff/OpenDBDiff
Description: Read and complete the full issue template Do you want to request a feature or report a bug? Bug Feature Version of OpenDBDiff e.g. 0.13.0.0 What is the current behavior? it gives for triggers wrong script after compare What is the expect...
Open Graph Description: Read and complete the full issue template Do you want to request a feature or report a bug? Bug Feature Version of OpenDBDiff e.g. 0.13.0.0 What is the current behavior? it gives for triggers wrong...
X Description: Read and complete the full issue template Do you want to request a feature or report a bug? Bug Feature Version of OpenDBDiff e.g. 0.13.0.0 What is the current behavior? it gives for triggers wrong...
Opengraph URL: https://github.com/OpenDBDiff/OpenDBDiff/issues/166
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Indexes are not scripted correctly ","articleBody":"## Read and complete the full issue template\r\n\r\n**Do you want to request a *feature* or report a *bug*?**\r\n- [x] Bug\r\n- [ ] Feature\r\n\r\n**Version of OpenDBDiff**\r\n\r\ne.g. 0.13.0.0\r\n\r\n**What is the current behavior?**\r\n\r\nit gives for triggers wrong script after compare \r\n\r\n**What is the expected behavior or new feature?**\r\n\r\nno error in script\r\n\r\n**Did this work in previous versions of our tool? If so, in which versions?**\r\n\r\nNo\r\n\r\n## Reproducibility\r\ncreate a table\r\n\r\nCREATE TABLE [dbo].[_Orders](\r\n\t[Order_Id] [varchar](50) NOT NULL,\r\n\t[OnDate] [datetime] NOT NULL,\r\n\t[Client_Id] [varchar](50) NOT NULL,\r\n\t[Price] [varchar](50) NOT NULL\r\n) ON [PRIMARY]\r\n\r\nGO\r\n\r\nSET ANSI_PADDING OFF\r\nGO\r\n\r\nALTER TABLE [dbo].[_Orders] ADD CONSTRAINT [DF__Orders_Order_Id] DEFAULT (newid()) FOR [Order_Id]\r\nGO\r\n\r\nALTER TABLE [dbo].[_Orders] ADD CONSTRAINT [DF__Orders_OnDate] DEFAULT (getutcdate()) FOR [OnDate]\r\nGO\r\n\r\n\r\ncreate an index\r\n\r\nCREATE UNIQUE NONCLUSTERED INDEX [IX_Orders_Client_Id] ON [dbo].[_Orders] \r\n(\r\n\t[Client_Id] ASC,\r\n\t[Order_Id] ASC,\r\n\t[OnDate] DESC\r\n)\r\nINCLUDE ( [Price]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = ON, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]\r\nGO\r\n\r\n\r\nthen compare the database with and empty database\r\n\r\nand you will get this \r\n\r\nCREATE TABLE [dbo].[_Orders]\r\n(\r\n\t[Order_Id] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF__Orders_Order_Id] DEFAULT (newid()),\r\n\t[OnDate] [datetime] NOT NULL CONSTRAINT [DF__Orders_OnDate] DEFAULT (getutcdate()),\r\n\t[Client_Id] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,\r\n\t[Price] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL\r\n) ON [PRIMARY]\r\nGO\r\nCREATE UNIQUE NONCLUSTERED INDEX [IX_Orders_Client_Id] ON [dbo].[_Orders]\r\n(\r\n\t[Client_Id] ASC,\r\n\t[Order_Id] ASC,\r\n\t[OnDate] DESC\r\n) INCLUDE ([Price]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFFIGNORE_DUP_KEY = ON, , ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]\r\nGO\r\n\r\n\r\nthe error is that it is missing a comma after off and it as a comma to much after the next ON\r\n\r\n= OFFIGNORE_DUP_KEY = ON, , ALLOW_ROW_LOCKS\r\n\r\ncorrect would be \r\n\r\n--\u003e = OFF, IGNORE_DUP_KEY = ON, ALLOW_ROW_LOCKS\r\n\r\n--\u003e\r\nINCLUDE ([Price]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = ON, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]\r\n\r\n","author":{"url":"https://github.com/salusalpha","@type":"Person","name":"salusalpha"},"datePublished":"2024-04-23T17:48:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/166/OpenDBDiff/issues/166"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f92e809b-9f33-438d-1b98-becb954fd8a5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A8F8:3B1D59:2A2679D:37B3271:6A5CD73F |
| html-safe-nonce | d96ac432dee58373434854ecd2e18b807c7b610f28dda232730d3683dbdc3bfe |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOEY4OjNCMUQ1OToyQTI2NzlEOjM3QjMyNzE6NkE1Q0Q3M0YiLCJ2aXNpdG9yX2lkIjoiNTIwMjAxNzY3NDM0MDM5MDcxOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | bdb618a0b08f1ef350fcf92fbd6a795f40fdf4818c6bde254fd23b0c9238d13c |
| hovercard-subject-tag | issue:2259432882 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/OpenDBDiff/OpenDBDiff/166/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e94784e00899d8b8ae62890dd1a2e9f51c104b9bc26310c0823e429115b88865/OpenDBDiff/OpenDBDiff/issues/166 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e94784e00899d8b8ae62890dd1a2e9f51c104b9bc26310c0823e429115b88865/OpenDBDiff/OpenDBDiff/issues/166 |
| og:image:alt | Read and complete the full issue template Do you want to request a feature or report a bug? Bug Feature Version of OpenDBDiff e.g. 0.13.0.0 What is the current behavior? it gives for triggers wrong... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | salusalpha |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| go-import | github.com/OpenDBDiff/OpenDBDiff git https://github.com/OpenDBDiff/OpenDBDiff.git |
| octolytics-dimension-user_id | 26923633 |
| octolytics-dimension-user_login | OpenDBDiff |
| octolytics-dimension-repository_id | 87295423 |
| octolytics-dimension-repository_nwo | OpenDBDiff/OpenDBDiff |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 87295423 |
| octolytics-dimension-repository_network_root_nwo | OpenDBDiff/OpenDBDiff |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width