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

Can't add index on Topic.SystemName becase it's nvarchar(max) #7294

Closed
alinmircea opened this issue Aug 10, 2024 · 1 comment
Closed

Can't add index on Topic.SystemName becase it's nvarchar(max) #7294

alinmircea opened this issue Aug 10, 2024 · 1 comment

Comments

@alinmircea
Copy link

alinmircea commented Aug 10, 2024

nopCommerce version: 4.60 +

Can't add index on Topic.SystemName becase it's nvarchar(max). Let's change it to nvarchar(400)

public override void MapEntity(CreateTableExpressionBuilder table)

Please add SystemName in column definition in the builder so column gets created with limited length.

@AndreiMaz AndreiMaz added this to the Version 4.80 milestone Aug 12, 2024
nirzaf added a commit to nirzaf/nopCommerce that referenced this issue Aug 13, 2024
Fixes nopSolutions#7294

Update `TopicTemplateBuilder.cs`, `Indexes.cs`, and `SchemaMigration.cs` to add an index on `Topic.SystemName` by changing its type to `nvarchar(400)`.

* **TopicTemplateBuilder.cs**
  - Add `SystemName` column definition with `nvarchar(400)` in `MapEntity` method.

* **Indexes.cs**
  - Add index creation for `Topic.SystemName` in `Up` method.

* **SchemaMigration.cs**
  - Alter `SystemName` column to `nvarchar(400)` in `Up` method.
@exileDev
Copy link
Contributor

exileDev commented Nov 6, 2024

Closed #7294 by d792595

@exileDev exileDev closed this as completed Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants