[PR #421] [MERGED] Fix compound indexes for dynamic models #505

Closed
opened 2025-12-29 15:32:44 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/JohnEstropia/CoreStore/pull/421
Author: @xquezme
Created: 4/5/2021
Status: Merged
Merged: 7/20/2021
Merged by: @JohnEstropia

Base: developHead: develop


📝 Commits (1)

  • 6a23940 fix compound indexes for dynamic models

📊 Changes

2 files changed (+2 additions, -2 deletions)

View changed files

📝 CoreStoreTests/DynamicModelTests.swift (+1 -1)
📝 Sources/CoreStoreSchema.swift (+1 -1)

📄 Description

Right now if you try to create any compound index for core store dynamic model you will receive syntax error. This because "-" is prohibited and caused syntax error. For instance, for Dog model in DynamicModelTests.swift you will receive this error:

near "-": syntax error in "CREATE INDEX IF NOT EXISTS Z_Dog__CoreStoreSchema_indexes_Dog_age-nickname ON ZANIMAL (ZAGE COLLATE BINARY ASC, ZNICKNAME COLLATE BINARY ASC)

Let's use "_" instead.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/JohnEstropia/CoreStore/pull/421 **Author:** [@xquezme](https://github.com/xquezme) **Created:** 4/5/2021 **Status:** ✅ Merged **Merged:** 7/20/2021 **Merged by:** [@JohnEstropia](https://github.com/JohnEstropia) **Base:** `develop` ← **Head:** `develop` --- ### 📝 Commits (1) - [`6a23940`](https://github.com/JohnEstropia/CoreStore/commit/6a2394052c93641f61bf12a4e8023b76529ae307) fix compound indexes for dynamic models ### 📊 Changes **2 files changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `CoreStoreTests/DynamicModelTests.swift` (+1 -1) 📝 `Sources/CoreStoreSchema.swift` (+1 -1) </details> ### 📄 Description Right now if you try to create any compound index for core store dynamic model you will receive syntax error. This because "-" is prohibited and caused syntax error. For instance, for `Dog` model in `DynamicModelTests.swift` you will receive this error: ``` near "-": syntax error in "CREATE INDEX IF NOT EXISTS Z_Dog__CoreStoreSchema_indexes_Dog_age-nickname ON ZANIMAL (ZAGE COLLATE BINARY ASC, ZNICKNAME COLLATE BINARY ASC) ``` Let's use "_" instead. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 15:32:44 +01:00
adam closed this issue 2025-12-29 15:32:44 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/CoreStore#505